Emperor Charles VI vowed it in 1713, a year after Vienna's last major plague epidemic, and dedicated it to his namesake Saint Charles Borromeo, venerated as a healer of plague victims. Johann Bernhard Fischer von Erlach won the design competition, building started in 1716, and after his death in 1723 his son Joseph Emanuel finished the church in 1737, shortening the drum of the dome and adding the attic storey.
The facade deliberately mixes sources. The central portico echoes a Greek temple, the two columns by Lorenzo Mattielli were modelled on Trajan's Column in Rome, and the tower pavilions at either side show the influence of Bernini and Borromini. The spiral reliefs tell the life of Charles Borromeo; the columns were also meant to recall Boaz and Jachim, the pillars that stood before the Temple at Jerusalem, and the Pillars of Hercules as emblems of imperial power. Over the door, the pediment relief of the cardinal virtues, with the patron saint on its apex, alludes to the vow behind the foundation, and angels from the Old and New Testaments flank the entrance.
Inside, the dome fresco by Johann Michael Rottmayr and Gaetano Fanti shows Charles Borromeo interceding with the support of the Virgin Mary, ringed by the cardinal virtues. Above the high altar, conceived by Fischer the elder and carried out by Ferdinand Maxmilian Brokoff, the saint rises towards a round, warm yellow window inscribed with the Hebrew name of God. The side chapels hold altarpieces by several painters, Sebastiano Ricci, Jakob van Schuppen, Martino Altomonte and Daniel Gran among them. The carved walnut pulpit, probably designed by the younger Fischer, was returned to its original lines in 2006 and 2007, when a heavy rim added around 1860 was removed from its canopy.
Antonio Vivaldi was buried in 1741 in the Spitaler Gottesacker cemetery that lay beside the church; the grave has been lost, and concerts of his music are held in the church in his honour. A religious order looks after the Karlskirche, which also serves as parish church of the Vienna University of Technology, and its address is Karlsplatz 10.




