City employees are donating in droves to Democratic presidential hopefuls — just not their boss.

Nearly 3,000 municipal workers, including several in City Hall, have collectively coughed up more than $200,000 to White House aspirants, but almost all of it went to Mayor Bill de Blasio’s rivals, data shows.

A review of data compiled by the nonprofit Center for Public Integrity — which looked at small-dollar donations made through the ActBlue fundraising Web site between January 1 and June 30 — reveals Hizzoner’s lack of financial support in his own backyard.

Of 2,923 donors who self-identified their employer as “NYC,” “City of New York” or “New York City” on their ActBlue profiles, only 74 of them — or about 2.5 percent — gave to de Blasio.

“He doesn’t have my support for president. I think there are candidates that have more to offer,” said one attorney on the city payroll, who donated to businessman Andrew Yang.

“New York City has lots of problems [de Blasio] could be working on,” she said, singling out surging bicyclist deaths as one area of concern, and dismissing de Blasio’s Beltway ambitions as “fantasyland.”

“I think he should just focus on being the best mayor for New York.”

City-employed donors scraped together about $12,600 for de Blasio, a pittance compared to what they doled out to other candidates.

Four hopefuls raked in more from city employees than de Blasio — led by Vermont Sen. Bernie Sanders, who netted just over $58,000, or nearly five times as much.

Massachusetts Sen. Elizabeth Warren and California Sen. Kamala Harris pocketed around $36,300 and $23,600 respectively — and de Blasio wasn’t even the most popular mayor among city workers, as South Bend, Ind. Mayor Pete Buttigieg tallied about $20,800.

“I’m still undecided, but it’ll definitely be between Bernie and Elizabeth Warren,” said Jonathan Buchalter, a city budget analyst who gave $58 to Sanders. “Pretty simply I just think they have American interests most at heart.”

Asked why he hasn’t opened his wallet for de Blasio, Buchalter said with a laugh, “For president?”

“I support de Blasio,” he said. “I think the other candidates are more qualified.”

While most of the de Blasio-averse donors are rank-and-file municipal workers, many hold positions within various City Hall arms.

“I myself am a woman … looking to go into policy and potentially politics at some point, so it feels good to put that forward,” said Courtney Loaicono, a policy analyst for the Mayor’s Office of Management and Budget who chipped in $55 for New York Sen. Kirsten Gillibrand, and another $20 for Warren.

“If he’s still there after the many Democratic candidates are whittled away then I would consider giving support to someone who is a male, white Democrat,” said Loaicono of de Blasio.

But most declined to discuss why they weren’t supporting their boss.