Chris Froome is set to win his fourth Tour de France title after increasing his lead in Saturday's penultimate time trial in Marseille.
With Sunday's stage into Paris traditionally a procession, Froome will be able to celebrate on the roads into the capital as he lead grew to 54 seconds over former team-mate Rigoberto Uran.
Frenchman Romain Bardet began the stage second, 23 seconds down, but faded badly and only retained a podium spot by one second ahead of Team Sky's Mikel Landa.
Bodnar, who was cruelly denied victory out of a breakaway on stage 11, completed the 22.5 kilometre course in a time of 28 minutes 15 seconds to win by just one second from his compatriot Kwiatkowski, with Froome a further five seconds back.
Froome's third place on the day means he is only the seventh man in history to win the Tour without picking up a stage victory on the way.
But he was able to enjoy the final metres all the same as he could be seen chasing down the struggling Bardet on the last straight towards the Stade Velodrome.
The 32-year-old would have known at that point his fourth Tour, and third in a row, was in the bag as Colombian Uran had, moments before, run wide on one of the final corners, touching the barriers and losing all momentum.
The Cannondale-Drapac rider recovered to take eighth place on the day, which sees him move up to second overall - matching his previous best in a grand tour as he was second in the Giro d'Italia in both 2013 and 2014.
Irishman Dan Martin finished in 40th place, enough to keep the Quick-Step Floors rider in sixth place in the general classification - his best ever finish in the Tour de France.
Bury's Simon Yates hung on to seventh place overall, securing the young riders' white jersey which was won by his twin brother and Orica-Scott team-mate Adam 12 months ago.