A teenage teacher aide has narrowly avoided being jailed for sexually grooming a 12-year-old girl.

Kevin Dean McMillan, 19, was sentenced in Auckland District Court this afternoon to an 18-month intensive supervision order and 200 hours of community work for offending that included exchanging more than 400 text messages, many of a sexual nature, with the young girl.

He was charged after he worked at an Auckland intermediate school.

Judge Roy Wade, who found McMillan guilty last month, said the effects of prison would be "absolutely devastating" on the teenager.

"Because of your immaturity and because of the nature of the offence you committed you would be regarded as the lowest of the low and the utmost despicable person in prison were I to send you there," Judge Wade said.

"You would be regularly assaulted in prison in a variety of extremely unpleasant ways by other inmates.

"Undoubtedly you would come out of prison worse than when you went in."

Judge Wade, in delivering his verdict last month, said some of McMillan's messages to the girl were "entirely inappropriate".

The texts included: "I want to hold you tight and be the lucky person who kisses you goodnight", "lol so how far have you gone with a guy", "don't worry I'm not going to rape I always respect girls" and "what guys have you gone out with that I'll have to watch out for".

McMillan had defended the charge and denied any sexual intent.

The text messages came to an end on August 24 last year, one week before the girl's father found them on his daughter's phone and complained to the school and police.

Judge Wade said McMillan had suffered substantially, including the "be shamed" nature of his court case being published, and as a result of his conviction his future career prospects would be "seriously impaired".

A pre-sentence report said McMillan had been "willing to talk about the issues around his offending and his life situation".

The report said he did not deny he had a problem and he had begun rehabilitation.

"He recognises his previous fantasy life was leading him nowhere but into serious trouble."

Judge Wade commended the 12-year-old victim for how she gave evidence to the court.

He said the girl had been the subject of "a lot of gossip circulating around the school" about her "relationship or lack of relationship" with McMillan.

"She felt very uncomfortable about all that gossip and I can well understand why," Judge Wade said.

The girl has started therapy and had lost a "substantial" time off school for police interviews and to give evidence at court.

Judge Wade congratulated the girl's father, who was in the courtroom for the sentence.

"It's obviously not been easy at all for you and your wife but I must say you've done a first class job of raising your daughter. I wish her every success in the future and I would urge her to do all she can to put this unhappy episode behind her and get on with her life."