If you’ve ever wondered what it feels like to get 30 years of your life back, just ask Francois Holloway. Better wait a few months, though.

The repentant Queens carjacker, who was sentenced in 1995 to 57 years in prison, will likely walk free in nine months thanks to a Brooklyn federal judge who never felt right about the mandatory sentencing he was forced to impose.

Judge John Gleeson successfully lobbied US Attorney Loretta Lynch to reassess Holloway’s fate, arguing that the sentencing guidelines were excessive.

Lynch eventually agreed to drop portions of the case against Holloway, allowing Gleeson to resentence him to time served.

“You’ve been given a second chance at life. Make it count!” Gleeson told Holloway during an emotional proceeding Tuesday.

Holloway, 57, still faces four years in prison for an unrelated state drug case from 1994 — but could be out on parole in just nine months, according to his attorney, Harlan Protass.

Showing the weight of more than two decades in prison with a long gray beard, Holloway thanked Gleeson, Lynch and prosecutor Sam Nitze for their efforts on his behalf.

“You are putting a blind trust in me,” the soft-spoken Muslim convert told Gleeson. “I assure all parties concerned that your efforts will not go unrewarded and unrecognized.”

Gleeson noted that the father of five had been a model prisoner despite facing the grim prospect of moldering behind bars until 2045.

“There is such a thing as turning one’s life around,” Gleeson said. “Even when there is no hope.”