A Sydney teenager who said he wanted to attack and terrorise "infidels" at a memorial service on Anzac Day in 2016 has been sentenced to 12 years' jail.

The boy, who cannot be identified because he is a child, was sentenced last Friday.

The case was suppressed, but the judge's sentencing remarks are now public.

New South Wales Supreme Court Justice Megan Latham ordered the boy to serve a maximum term of 12 years' jail with a non-parole period of nine years.

"On any view, the offender clearly contemplated an attack which was ideologically and religiously driven, and chosen for the impact such an attack would have had on a public holiday of great national significance," Justice Latham said.

"The offender said that he had a time and a place in mind for an attack, that it would be April 25 because it was an important day for the 'infidels' and that he wanted to terrorise them on that day."

The boy pleaded guilty in March 2017 to one count of doing an act in preparation for, or planning, a terrorist act, an offence which carries a maximum penalty of life imprisonment.

According to an agreed statement of facts tendered to the court, he first came to the attention of the Joint Counter Terrorism Team (JCTT) in May 2015 because he was accessing violent religious extremist material on the internet.

"The offender's home was searched by the JCTT, an event that shocked the offender and disclosed the offender's activities to his family for the first time," the judge said.

The boy was referred to a diversion program to address his risk of radicalisation and counter any tendency towards violence and extremism, but the judge said the boy did not attend the sessions because he was working.

Boy pledged allegiance to Islamic State

The agreed facts state that in mid-April 2016, the boy accessed an encrypted online messaging application using a pseudonym and initiated conversations with two people who turned out to be undercover police officers.

"The offender told these two individuals that he was a Muslim Australian who supported the Islamic State, that he planned to attack the 'infidels' at a memorial service on Anzac Day and that he wanted assistance in making a bomb and obtaining a gun," Justice Latham said.

"He expressed a desire to learn how to make a bomb, a desire to martyr himself, an intention to target 'infidels', and a request for a gun."

The boy was arrested on the eve of Anzac Day 2016.

When police searched his mobile phone they found photos and links about Islamic State and a video depicting beheadings and executions in the name of religious extremism.

Officers also seized handwritten notes in which the offender declared his allegiance to Sharia law and to the caliphate.

"During the offender's interview with police, in the presence of his father on April 24, 2016, the offender stated that he was upset and angry with the Australian Government over its involvement in the war in Syria," Justice Latham said.

She said he also told police he had conducted online research about Islamic State and he believed Sharia law should prevail in Australia to the exclusion of democracy.

The boy's lawyers argued that his online enquiries "may be characterised as amateurish" — he had not carried out any reconnaissance of a target and had no capacity to carry out an attack, but the judge said she found his offending serious.

"The depth and the extent of the offender's radicalisation is considerable when assessed by reference to the barbarous nature of the offence that the offender was actively contemplating, his communications with the operatives and the extremist nature of the material which the offender had been accessing over a period of one year," Justice Latham said.

She added that she thought the boy has developed some insight into his offending behaviour while in prison and has expressed genuine remorse.

He will be eligible for parole in April 2025.