Mayor de Blasio got a Whoopin’ on the “The View” Wednesday, when he tried to brag about his progressive agenda only to have co-host Whoopi Goldberg lecture him about her pet peeve — bike lanes.

“You screwed the city up!” she raged about all the space set aside on city streets for cyclists.

“You’ve built 83 miles of protected bike lanes, OK. And I like bikes, I like people who ride, but I don’t think you understand the impact of taking something like 10th Avenue,” said the comedian as de Blasio sat stunned and silent.

“I am upset that you love these bikes, but you don’t tell people to put a helmet on,” she added. “We tell children to put helmets on.”

The unexpected lecture from the “Sister Act” star began as the mayor seemed to be on a roll, talking at length about his proposal for universal health care.

De Blasio got some expected criticism for the free-health plan from the show’s conservative co-host, Meghan McCain — but then, late in the eight-minute appearance, the generally liberal Goldberg, who lives in West Orange, NJ, delivered a sudden left hook.

“That all sounds good, [but] you know what’s really pissing me off?” she said.

“What? I’ve never heard you pissed off before,” a smirking de Blasio responded.

“No, you actually haven’t!” Goldberg said coldly, before launching into her litany of complaints about bike lanes.

“Tenth Avenue, which is six lanes down to 2-and-a-half — particularly when you have a winter storm and you can’t move. None of that is movable … so nothing flows,” she said.

“This is an issue and you haven’t taken down the size of the trucks … We got nine-block-long trucks delivering, and they can’t make the turns. What feasibility study did you all do when you decided to put these [lanes] in? Because I know a lot of places, there — I noticed they’re not on Madison Avenue and they’re not Park Avenue.”

“They’re all over Whoopi, respectfully, they’re all over,” de Blasio said.

“No, they’re not. They are actually not on Park and they’re [not on] Madison,” she correctly responded.

When the mayor said bike lanes are in “every kind of neighborhood,” both ­McCain and the audience piled on.

“The audience is … They say no it’s not,” McCain said to laughter from the crowd. “The audience are New Yorkers who say no.”

A flustered de Blaso then tried to defend himself, saying, “Here’s the bottom line. The number-one reason we have done this is a specific strategy we call Vision Zero.”

When the mayor said, “New York City, the fewest traffic fatalities since 1910,” Goldberg’s fellow liberal host, Joy Behar, joined in the de Blasio beatdown. “Well, there weren’t any cars in 1910,” Behar said. “That was tricky, that was tricky what you said.”

Goldberg — who backed de Blasio’s Democratic rival Christine Quinn for mayor in 2013 and opposed his campaign to scrap horse carriages — then accused him of not understanding because “you go through the city with a police escort,” and suggested that bike lanes are part of a conspiracy.

“I’m just saying you might want to take a look at some of this,” she said. “Because now you have Cuomo coming in talking about congestion pricing, and I kind of feel like it’s a setup.”

Although Goldberg was correct that 83 miles of bike lanes have been installed under de Blasio, he didn’t come up with the idea for them. The first of the 119 miles of such lanes in the city were installed in 2007 under Mayor Mike Bloomberg.

Last year, there were 10 cyclist deaths citywide, compared with 24 in 2017.

It’s unclear whether the focus of Goldberg’s ire was a popular dedicated bike lane running from West 72nd Street — where Tenth Avenue becomes Amsterdam Avenue — to West 110th Street.

The de Blasio administration is currently considering expanding that dedicated path another mile south, from West 72nd Street into Tenth Avenue proper.

“The View” hosts ended the de Blasio visit by asking him if he would run for president in 2020.

“I am mayor of New York City. That is what I am focused on,” he said.

To which co-host Abby Huntsman shot back: “That’s not an answer.”

Mayor Bill de Blasio went on ABC’s “The View” on Wednesday to tout his accomplishments — but instead got roasted by co-host Whoopi Goldberg over his love for bike lanes.

“It all sounds good, but you know what’s pissing me off?” said Goldberg, after Hizzoner spent several minutes touting his recently announced universal medical care plan for uninsured residents.

“You built 83 miles of protected bike lanes, and I like people who ride, but I don’t think you understand the impact of taking something like Tenth Avenue, which is six lanes, down to two-and-a-half — particularly when you have a winter storm and you can’t move. None of that movable, so nothing flows,” added Goldberg, referring to the Tenth Avenue dedicated bike lane.

But the award-winning actress and comedian was just warming up.

“Listen, you go through the city with a police escort,” said Goldberg, who schleps from New Jersey to Midtown for work. “I come in every day; I come in every day! And I find because you can’t make a turn anywhere, you can’t go straight anywhere. When there’s a storm, people can’t move anywhere because you got all these medians in the way.

“And I am just saying you might want to take a look at all of this because you now have [Gov.] Cuomo coming in talking about congestion pricing and I kind of feel like it’s a setup,” said Goldberg, to loud applause from the audience.

“I am upset that you love these bikes, but you don’t tell people to put helmets on,” she added. “We tell children to put helmets on.”

She also griped about how large delivery trucks are finding it difficult to co-exist with bike lanes and also questioned the city’s selection process for installing them.

“We have nine-block-long trucks delivering, and they can’t make the turns,” she added. “What feasibility study did y’all do when you decided to put these in? I noticed they are not on Madison Avenue, and they are not on Park Avenue?”

A red-faced de Blasio sat quietly most of the time while being lectured. But he did briefly get a chance to reply that his “Vision Zero” plan, which includes adding more bike lanes, is saving lives by cutting down on traffic deaths.

“We had last year the fewest number of traffic fatalities since 1910,” de Blasio said.

“In 1910, there were more horses than cars in New York City. Every year since then, the traffic fatalities went up and up. We brought it down to the level of 1910 because these bike lanes slow down the traffic.”

However, Goldberg wasn’t buying it and fired back: “But you screwed the city up!”

De Blasio, who is not ruling out running for president in 2020, has beefed up appearances on national television since the start of the year.

When asked about his interest in becoming president, de Blasio said: “I am mayor of New York City. That is what I am focused on.”