The government is to fund a scheme that will see "carefully vetted" prisoners taught to code in order to better prepare them for the world of work.
The project is part of a £1.2m effort to increase the digital skills of people from disadvantaged groups.
The courses will be led by volunteers and industry experts and prisoners will work on real-world projects with external clients.
They will start with basic coding before moving to a more advanced level.
An award of £100,000 will be given to fund the project in two prisons initially - Humber and Holme House, in County Durham - as well as an employment hub in Sheffield.
The hope is that the trials will eventually lead to a network of coding workshops in UK prisons.
The programme is modelled on the Last Mile project in the San Quentin prison, in California, which has helped almost 500 offenders find jobs after release, with none of those taking part reoffending.
That compares with a national reoffending rate in the US of 55%.
Reoffending in the UK is estimated to cost around £15bn, according to the Department of Digital, Culture, Media and Sport.
Minster for Digital Margot James said: "The government is committed to stopping the cycle of reoffending and a valuable asset to prevent recidivism is employment.
"Equipping offenders with coding skills will help them into life-changing work and give them a path to a hugely rewarding career."
Neil Barnby, who has been teaching coding to prisoners at HMP Humber, as part of an organisation called Code 4000, said: "The workshops are reducing reoffending at a measurable rate, because we keep in touch with our graduates.
"We are constantly seeing success after success.
"When I started teaching in prisons, I thought that if I could change just one life, turn one person away from crime, then I have achieved something truly marvellous.
"I look back on the years that I have been teaching coding in prisons and can see all the lives I have had a part in changing for the better.
"Not just the ex-offenders but their families and, more importantly, their children.
"It is an enormous sense of achievement - and with this funding, I look forward to changing even more lives."
They will then work on real-world projects for external clients, with money earned being ploughed back into the project.
Stage three of the process will see them working for clients on temporary day release, with the aim of helping them find full-time employment as developers when their jail terms are complete.