The winner of stage 17 of the Tour de France was not able to break the race leader on the mountain stage.
Defending champion Pogacar won the uphill sprint, but only cut Vingegaard's lead by four seconds.
The leader going into Thursday's final mountain stage from Lourdes to HautaCAM is the Danes.
Geraint Thomas stayed third overall.
At the end of the day, it was only the top two and Pogacar's team-mate Brandon McNulty, who finished third.
The shortest road stage of the tour was Stage 17 to Peyragudes, but it was also one of the most demanding, with a route from Saint- Gaudens to Peyragudes containing four climbs in the final 76 km.
Stage 17 results
Tadej Pogacar (Slo/UAE Team Emirates) 3hrs 25mins 51secs
Jonas Vingegaard (Den/Jumbo-Visma) same time
Brandon McNulty (US/UAE Team Emirates) +32
Geraint Thomas (GB/Ineos Grenadiers) +2:07
Alexey Lutsenko (Kaz/Astana-Qazaqstan Team)+2:34
Romain Bardet (Fra/Team DSM)+2:38
David Gaudu (Fra/Groupama-FDJ)+3:27
Aleksandr Vlasov (Bora-hansgrohe) +3:32
Louis Meintjes (SA/Intermarche-Wanty-Gobert MatEriaux) same time
Nairo Quintana (Col/Team Arkea-Samsic)
General classification after stage 17
Jonas Vingegaard (Den/Jumbo-Visma) 67hrs 53mins 54secs
Tadej Pogacar (Slo/UAE Team Emirates)+2:18
Geraint Thomas (GB/Ineos Grenadiers) +4:56
Nairo Quintana (Col/Team Arkea-Samsic) +7:53
David Gaudu (Fra/Groupama-FDJ) +7:57
Romain Bardet (Fra/Team DSM) +9:21
Louis Meintjes (SA/Intermarche-Wanty-Gobert Materiaux) +9:24