The vast majority of NYPD cops hate Mayor de Blasio, according to a police-union survey.

An overwhelming 96 percent of the 6,000 cops who responded to the poll have unfavorable opinions of Hizzoner, with 88 percent holding “very unfavorable” opinions of him, the Patrolmen’s Benevolent Association survey found.

As for specific complaints against the mayor, 97 percent said de Blasio has created an environment where criminals feel emboldened, while 95 percent said he has established an environment that is combative to police.

When asked what they liked “most” about de Blasio, 66 percent responded, “nothing.”

Eight-five percent of cops gave City Council Speaker Melissa Mark-Viverito an unfavorable rating, and 96 percent are dissatisfied with the City Council in general.

Top cop Bratton, however, received higher ratings, with 66 percent of cops approving of his performance, the survey says.

Ninety-seven percent of PBA members said they feel less safe on duty, and the same percentage of respondents said they felt less likely to take action now, fearing lawsuits or complaints.

Roughly 6,000 PBA members responded to the survey out of more than 24,000 members.

“The brave men and women who risk their lives to protect New Yorkers should feel confident that their hard work is having a positive impact,” PBA President Patrick Lynch said Tuesday.

“Unfortunately, as this survey proves, the majority of our police officers do not feel supported by Mayor de Blasio’s administration or the city council, and believe their unfavorable public safety policies have New York City on the wrong track.”