Jail is "like an infection" for children, who get exposed to criminals and are highly likely to re-offend after just one stint behind bars, an inquiry into youth justice has been told.

The NSW parliamentary inquiry, which will also visit Dubbo in August, is examining ways to reduce the number of children in contact with the justice system, looking at crime and its connection with poverty, homelessness and trauma.

It was established after widespread reporting of a spate of youth crime, which led to stricter bail laws for repeat offenders and large-scale police operations in 2025.

"The justice system is like an infection," eminent Scottish forensic psychologist Karyn McCluskey told the inquiry in Sydney on Friday.

"You get it once, it can become lifelong and life-limiting."

The inquiry was told Scotland removed all people aged under 18 from detention in 2024 with child offenders considered for their "needs not deeds".

"They come from decades of failure of systems," Ms McCluskey said.

Politicians of all stripes supported the changes because they were evidence-based, she said.

In the US, there were 109,000 children in juvenile detention and 14,500 in adult jails after a law and order crackdown in the 1990s, former New York City probation and corrections commissioner Vincent Schiraldi said.

But after research ushered in youth support programs instead, there was a 78 per cent reduction in juvenile crime.

Mr Schiraldi said a Chicago study comparing child offenders who were jailed to those who were not showed stark results.

Those who went into diversion programs gained social capital, graduated from school and went to work.

"Kids in custody are experiencing... criminal capital," Mr Schiraldi told the inquiry.

"They're associating with other young people who are delinquents... they're also not getting to make their own choices and learn from their own mistakes.

"The young people... who got incarcerated had higher rates of reoffending."

It was extremely tough to help children once they had served any time, BackTrack Youth Works director Bernie Shakeshaft said.

"When we get in early and... wrap this sense of belonging and care and learning and generosity around them, we're saving not only children's lives, but the community a truckload of money," Mr Shakeshaft said.

It costs about $1.2 million per year to keep a child in a NSW jail, the inquiry was told.

School exclusion is a known predictor of youth offending.

NSW Council of Social Service runs a wellbeing program at a primary school in Sydney's southwest that gives children and families access to healthcare, essential groceries and links to other support.

That has freed up teachers to focus on the work of educating, chief executive Cara Varian told the inquiry.

"We see these school hubs as a way of being able to achieve reduction of exclusion, if not elimination of exclusion," Ms Varian said.

The inquiry continues and is due to sit in Dubbo in August.