The England and Chelsea defender was acquitted of calling Ferdinand a "f****** black c***" during a Premier League game at QPR on October 23 last year.
Chief magistrate Howard Riddle cleared the 31-year-old of a racially aggravated public order offence at Westminster Magistrates' Court.
Giving his verdict, Mr Riddle said the case was not about "whether Mr Terry is a racist in the broadest sense of the word".
He said he had heard a great deal of evidence to show that he is not.
"It is understandable why Mr Terry wants to make this point, his reputation is at stake," he said.
Terry left the court within minutes of the verdict.
Looking impassive, he was escorted by aides past the media scrum.
He made no comment but was cheered by a small group of Chelsea supporters as he was driven away.
The Crown Prosecution Service defended the decision to prosecute the former England captain.
Alison Saunders, chief crown prosecutor for London, said: "The very serious allegation at the heart of this case was one of racial abuse.
"It was our view that this was not 'banter' on the football pitch and that the allegation should be judged by a court.
"The Chief Magistrate agreed that Mr Terry had a case to answer, but having heard all of the evidence he acquitted Mr Terry of a racially aggravated offence.
"That is justice being done and we respect the Chief Magistrate's decision."
Explaining his verdict, Mr Riddle said the prosecution presented a strong case.
He said: "There is no doubt that John Terry uttered the words 'f****** black c***' at Anton Ferdinand.
"When he did so he was angry. Mr Ferdinand says that he did not precipitate this comment by himself, accusing Mr Terry of calling him a black c***.
"Even with all the help the court has received from television footage, expert lip readers, witnesses and indeed counsel, it is impossible to be sure exactly what were the words spoken by Mr Terry at the relevant time.
"It is impossible to be sure exactly what was said to him at the relevant time by Mr Ferdinand.
"It is not only that all of this happened in a matter of seconds.
"For a small part of the relevant time the camera's view of Mr Terry was obstructed.
"We do not have a clear camera view of Mr Ferdinand, sufficient to pick up exactly what he said.
"No matter how serious the incident looks now, and how crucial the exact wording is now, at the time it was secondary to the key witnesses.
"They are professional footballers in the final minutes of a game where the result mattered to them both.
"They would naturally concentrate on the game more than on exactly what had been said to them or by them.
"There was the noise of the crowd. There is the fact that towards the end of a game players are not only physically tired they are also mentally tired. I don't need evidence to tell me that.
"It is a crucial fact that nobody has given evidence that they heard what Mr Terry said or more importantly how he said it.
"He has given effectively the same account throughout. Insofar as there are discrepancies in his account, they are understandable and natural.
"He says that he was himself wrongly accused by Mr Ferdinand on the pitch of calling him a black c***.
"He has maintained that from the beginning.
"(Terry's team mate) Mr Ashley Cole has corroborated that it was mentioned to him during the game.
"There is no doubt that reasonably soon after the game he made the accusation to Mr Ferdinand. He confirmed that basic account in a statement on the evening of the match.
"He gave a very detailed account to the FA and later to the police. He gave evidence to that effect in this court.
"There have been minor discrepancies in the account.
"It seems likely that his belief that he was wrongly accused on the pitch has strengthened as time goes by, and I have discussed that above.
"However, his account has been subject to the most searching and thorough questioning on at least three occasions.
"Nobody has been able to show that he is lying. The lip readers do not provide evidence that categorically contradicts his account.
"What may at first sight have seemed clear to the non-expert, is less clear now.
"There are limitations to lip reading, even by an expert. I have assessed John Terry as a credible witness.
"Weighing all the evidence together, I think it is highly unlikely that Mr Ferdinand accused Mr Terry on the pitch of calling him a black c***.
"However, I accept that it is possible that Mr Terry believed at the time, and believes now, that such an accusation was made.
"The prosecution evidence as to what was said by Mr Ferdinand at this point is not strong.
"Mr Cole gives corroborating (although far from compelling corroborating) evidence on this point.
"It is therefore possible that what he said was not intended as an insult, but rather as a challenge to what he believed had been said to him.
"In those circumstances, there being a doubt, the only verdict the court can record is one of not guilty."
Watch: Terry found not guilty of racism... More Videos
Outside the court, Chelsea chairman Bruce Buck said: "Chelsea Football Club notes and, of course, we respect the decision of the magistrate today. We are pleased that John can now put his mind to football and go back to training and do what he's done for many years."
Dan Morrison, Terry's lawyer, said outside court: "The court has today acquitted John Terry of all charges.
"He has consistently explained his position to the FA, the police and to the court.
"He did not racially abuse Mr Ferdinand and the court has accepted this.
"John would like to thank his legal team for their hard work and his family, friends and Chelsea Football Club for their support."
Leaving court, Ferdinand's parents, Julian Ferdinand and Janice Lavender, who attended every day of the trial, declined to comment.
Mr Ferdinand said: "I have nothing to say to you at all."