A bathroom bandit pleaded guilty on Thursday to swiping pricey plumbing materials from fast-food joints in Queens — and it’s a deal that’ll spare him extra time in the can.

It took persuading from Queens Supreme Court Justice Barry Kron for Richard Mirabile to agree to cop to third-degree criminal mischief, a felony, in exchange for time served and no probation.

“He’s not interested in a felony disposition,” the plumbing pilferer’s lawyer Anthony Rattoballi said in court early on in the hearing.

That prompted Kron to remind Mirabile that he would face up to seven years in prison if the case went to trial.

“This case can be resolved and you will serve the time you have served. Is that clear?” the jurist asked before taking a break for the defendant to weigh his options in the crappy caper.

Prosecutors said Mirabile, 45, waltzed into restrooms at various Wendy’s, Burger Kings and Arby’s in Queens to steal flushing mechanisms worth $250 across a one-month span late last year.

“Bypassing the counter to order a quick meal, the defendant allegedly made a beeline for the restrooms and exited minutes later with toilet flush fixtures stuffed in a bag,” late Queens District Attorney Richard Brown said at the time.

After the break, Mirabile — who’s been locked up since arrest on Dec. 28 — decided option No. 2 was his best bet and pleaded guilty.

His criminal record includes 13 prior arrests, including three for alleged drug possession in October.