Every inmate who leaves a Big Apple jail after serving a sentence will have a job waiting for him or her, under a new city-funded initiative, Mayor de Blasio announced Wednesday.

When asked why ex-convicts were being guaranteed work over unemployed residents who haven’t broken the law — including city high-school and college graduates — Hizzoner insisted the initiative, which will cost taxpayers $10 million a year, is a “smart investment for everyone.”

“Getting out of the cycle of crime and incarceration is in everyone’s interest,” he said.

“It’s part of life and we have to do better and better at breaking that cycle. And that is in the taxpayer’s interests, that’s in the community’s interests, that’s humane, that fits our faith traditions.”

He urged unemployed people to head to a Workforce Career Center for job advice.

Under his Jails to Jobs initiative, “transitional employment” — which is voluntary and lasts up to eight weeks — will be offered to an average of 8,500 ex-cons a year in an array of fields.

For some former inmates who lack basic skills, the gigs will be nothing more than paid job training, the city said.

One organization the city will be working with, the Fortune Society, has helped ex-inmates get positions in food services, maintenance, advocacy and media.

No one will be disqualified from the program based on their past criminal history, even if they have gang ties or were sex offenders, according to Department of Correction Commissioner Joseph Ponte.

During his announcement, de Blasio cited research showing that connecting ex-cons to jobs can reduce recidivism by 22 percent.

“Transitional employment often leads to longer-term employment and, again, an opportunity to have counseling, peer mentoring along the way,” he said.

In addition to the short-term jobs, inmates leaving city jails will be paired up with “peer navigators” — former inmates who have “successfully stabilized” after spending time behind bars, the city said.

Convicts entering the jail system will also meet with counselors from the start of their sentence and participate in five hours of “vocational, educational, and therapeutic programming” every day to help them prepare for their release from prison.

The Correction Officers’ Benevolent Association blasted de Blasio for focusing on an education initiative when, its leaders claim, he can’t keep inmates and guards safe in jail.

“The mayor has apparently given up on keeping the jails safe for both correction officers and inmates, as evidenced by the 18 percent increase in slashings and stabbings last year,” said COBA President Elias Husamudeen.

“His reforms to make the jails safer have failed miserably, so these same inmates have a greater chance of being stabbed or slashed by other inmates than they do making it to a job interview.”

Of the $10 million per year budget, $7 million will go toward wages for the ex-inmates, $2 million will be for tuition support and $800,000 will pay for the peer navigators.

The wage money will go directly to the nonprofits, which will either pay ex-inmates directly or pay their employers.

Other nonprofits the city will be working with include Housing Works, Strive International and Friends of Island Academy.

Additional reporting by ­Danika Fears