Karel Šviha (11 June 1877 in Nový Bydžov – 29 June 1937 in Prague) was a Czech politician in Austria-Hungary.
Šviha worked as a judge in Žamberk and was a member of the Czech National Social Party. In 1907 he was elected to the provincial parliament of Bohemia, and in 1907 to the Reichsrat (Imperial Council of Austria-Hungary) where he stayed until 1914. In 1911 he became the leader of the party's group in the parliament. In this role he supported pro-Austrian politics. Šviha was author of several political and economical brochures.
On 8 April 1911 a lawyer named Paštika informed Josef Anýž, the editor-in-chief of the Prague newspaper Národní listy, that Šviha was a secret collaborator with the police in Prague, had been assigned the cover name "Wiener", and was being paid 800 krones per month. The newspaper was closely associated with the Young Czech Party; since the party at the time negotiated an election coalition with the National Socialists this information was not published. 
In 1914 the political situation had changed and on 4 March 1914 the newspaper published the accusation; this started a fierce political outcry against the "traitor of the nation", similar to the earlier campaign against Karel Sabina. Šviha admitted contacts with police officer Klíma but denied that he was a police informer. He gave up his parliamentary seat and sued the newspaper. During the court case, in May 1914, Šviha was not able to prove his innocence and, thoroughly disgraced, left politics. Among the few supporters of Šviha was Tomáš Masaryk who later he admitted he was mistaken.
The affair left a lasting trace in Czech: the words "průšvih" 'to be in a pickle' and "prošvihnout" 'to miss an opportunity' derive from Šviha's surname.
Later, Šviha worked in a patent office in Prague and, after the war, as a lawyer for Jindřich Waldes' button factory. He died, forgotten, in 1937.
After the creation of Czechoslovakia (1918) the Prague police archive was opened and investigated. It was discovered that Šviha used police officers to keep contact with Archduke Franz Ferdinand of Austria (then successor of the ruling monarch), for whom he elaborated reports and political analysis. This work had been paid from police funds.