Celebrity chef Mario Batali, fed up with overzealous city health inspections, plans a new weapon at his eateries — a hidden alarm that alerts kitchen workers that an inspector has arrived so they can quickly trash any meals they’re cooking and scram.

A button at the hostess stand triggers a loud buzzer in the kitchen, said a Batali employee, and gives staff a chance to toss out what’s on the stove or in the oven and go on break before the inspector enters.

“You’re supposed to keep pressing that button,” the employee said.

Without meals or chefs, a kitchen is less likely to get nailed, since infractions often involve dishes being held at improper temperatures and food workers not following rules. Fines can top $5,000 per visit and result in a “B” or “C” grade.

And city inspectors are targeting more eateries than ever. Fines have surged 180 percent since 2006, rising from $16 million to $45 million in 2012.

Critics say the crackdown is only meant to raise revenue.

The alarm system is coming to each of Batali’s nine city restaurants, says the employee. A manager at Lupa and a hostess at Babbo, two of Batali’s eateries, told The Post last night the system was in place but hadn’t been used yet.

Batali did not return repeated calls for comment. But Batali partner Joe Bastianich denied such a system exists.

“You don’t have to throw away food. The rules are not that idiotic,” he said.

Asked if his eateries intended to evade inspectors, he said: “None that I know of. It’s not something I would condone.”

The employee said Batali once had a policy of firing any manager whose restaurant failed to get an “A,” which the city awards to places with 13 or fewer violation points.

But he’s now convinced that violations are arbitrary and unfair, the employee said.

A Health Department spokeswoman said an eatery found engaging in such evasive practices would have its inspection halted and be cited for obstruction, a 28-point violation. Eateries with 28 or more points fail inspection and could be shuttered.

But restaurant insiders say the tactic of quickly closing up shop is increasingly common.

“Completely ditching everything in the kitchen and stopping service is something we’re hearing about now,” said Andrew Moesel, a spokesman for the New York State Restaurant Association.

“The Department of Health has put people in a position where they essentially have to shut their restaurants down in order to comply with health inspections. Why take the chance that one steak is not holding at the right temperature and risk a fine? It’s easier just to throw it away — and there’s no rule against that.”

Meanwhile, a source at the department said it is considering doing more inspections at “A” eateries, which are afforded a year before their next visit. “Maybe some people say, ‘Well, we can take it easy for a while,’ ” the source said. “So they’re thinking of changing that and not waiting for a year.”

Health-inspection fines have become a hot political issue.

Mayor Bloomberg says that they ensure public safety and that restaurants have become more compliant since 2010, when letter grades went into effect.

But Council Speaker Christine Quinn, a mayoral hopeful, says the fines border on harassment, driving eateries and bars out of business.

CHEESE IT! IT’S THE FUZZ!Chef Mario Batali’s chefs toss food once a buzzer alerts them to an inspector, an employee says. (FilmMagic)