NEW YORK — It’s not just famously cranky New Yorkers who can’t stand Mayor Bill de Blasio. Voters across the nation view him less favorably than President Donald Trump and any other Democratic candidate for president, a new Quinnipiac University poll shows.

Just 8 percent of voters asked about de Blasio said they view him favorably while 45 percent view him unfavorably, according to the national poll published Tuesday. That net favorability rating of -37 is much worse than Trump’s score, which stands at -19 despite de Blasio lambasting him as “Con Don” over the past week.

De Blasio’s score is by far the worst among the roughly two dozen Democrats running for president. The mayor also performed worst among members of his own party — 14 percent of Democratic voters view him favorably and 35 percent view him unfavorably, the poll shows.

While other White House hopefuls struggle with name recognition, just 48 percent of voters overall said they haven’t heard enough about him to form an opinion. That suggests most voters know who de Blasio is, but just don’t like him.

Additionally, 8 percent of Democrats and Democratic-leaning voters said they would be unhappy with de Blasio as their party’s presidential nominee. That rate is second only to former vice president Joe Biden and U.S. Sen. Bernie Sanders, who each got 10 percent.

The findings aren’t surprising given de Blasio’s recent poll numbers in New York. About three quarters of New York City voters said he shouldn’t run for president in a survey published last month. And another Quinnipiac poll from March found that de Blasio was less popular than Trump among voters statewide.

The mayor has dismissed his poor showing in the polls, saying that he’s beaten the odds before.

“The poll that actually matters is the election, so New Yorkers have twice said that they want me to lead them,” de Blasio said in a television interview last week as he rolled out his 2020 campaign.