Racist fire bomber Mark Bulman has pleaded guilty to trying to start a blaze at the Broad Street mosque.
The 22-year-old pleaded guilty to attempted arson at the Muslim place of worship as well as two counts of religiously aggravated criminal damage.
After hearing the guilty pleas a judge at Swindon crown court said he needed a report from a psychiatrist before passing sentence.
Bulman appeared in the dock at Swindon crown court from custody wearing a grey sweatshirt and faded jeans. He was unshaven and with cropped hair.
As well as admitting the race hate offences he also admitted arson when he set light to a wooden gate on Broad Street during the same night.
Bulman threw a petrol bomb through a window of the mosque during the early hours of Thursday August 17 but it failed to ignite.
He also daubed racist graffiti and swastikas on the outside of the building which has been a target for extremists in the past.
And in the same spate of attacks he left racist messages on a wall in Turl Street which belongs to the local council.
However he denied further charges of religiously aggravated criminal damage relating to graffiti in the Whale Bridge underpass and on a wall on Ponting Street.
Bulman, of no fixed abode bit from the Moredon area, admitted arson, attempted arson and two counts of religiously aggravated criminal damage.
Claire Marlow, defending, said that her client had been seen by a psychiatric nurse who, following a preliminary assessment, was under the impression he did not have any mental health problems.
But she said bearing in mind the arson offences the court may benefit from a full psychiatric report.
Judge Tom Longbotham said "Arson is always worrying and I think the court might be criticised if it didn't have a medical report."
Adjourning the case and remanding Bulman in custody the judge said "You have pleaded guilty to a very serious charge indeed.
"These are the sort of charges which greatly concern the courts and before any sentencing exercise is carried out there should be a report from a forensic consultant psychiatrist.
"Whether that assists the court remains to be seen but that is what the court is ordering at the moment.
"I want you to be under no misapprehension at the moment about the seriousness of the charges.
"Certainly on the information known to the court I am told you recognise custody is almost inevitable. Indeed that is absolutely right."
Teenager racist Michael Matthews was jailed in January after setting a fire at a rear window of the mosque.
He was caught launching the day time attack after police set up covert camera following a spate of vandalism and graffiti.
The 17-year-old had also daubed offensive slogans on the Hindu and Sikh temples in other parts of town.
Matthews, of Helston Road, Park North, received a two year detention and training order meaning he will spend the first year behind bars.