The Duchy of Salzburg (German: Herzogtum Salzburg) was a Cisleithanian crown land of the Austrian Empire and Austria-Hungary from 1849 to 1918. Its capital was Salzburg, while other towns in the duchy included Zell am See and Gastein. Before becoming a crown land, Salzburg went through numerous changes of rulership. It is differentiated from its predecessor, the Prince-Archbishopric of Salzburg, as it was mediatized in 1803 through the Reichsdeputationshauptschluss and remained henceforth under secular rule as the Electorate (Kurfürstentum) of Salzburg; in the following 43 years, it would undergo three more changes of rulership before becoming the crown land of Salzburg.
In the course of the German mediatization of 1803, the Prince-archbishopric of Salzburg, an ecclesiastical State of the Holy Roman Empire, was secularized as the Electorate of Salzburg, ruled by the Habsburg archduke Ferdinand III of Austria. However, two years later, this short-lived principality was annexed by the newly established Austrian Empire according to the Peace of Pressburg and Ferdinand received the Grand Duchy of Würzburg in compensation. The electoral title became obsolete with the Empire's dissolution in 1806. By the Treaty of Schönbrunn of 1809, Salzburg temporarily became French and was released in 1810 to the Kingdom of Bavaria, where it formed the Salzachkreis.
After the end of the Napoleonic Wars and the 1816 Treaty of Munich, the Salzburg lands came back to Austria, with the exception of the share on the left bank of the Salzach river, the so-called Rupertiwinkel, which, like the former Prince-Provostry of Berchtesgaden, remained in Bavaria. Some smaller areas in the Ziller and Defereggen valleys fell to Tyrol; the town of Friesach was ceded to Carinthia. The Salzburg territory was administered from Linz as Salzburgkreis, the fifth district within the crown land of Upper Austria. The decreased significance led to emigration and economic crises. On the other hand, the remote province developed as a tourist destination, mainly for Alpinists like Archduke John of Austria.
After the Revolutions of 1848, the Salzburg territory was again separated from Upper Austria and became a new crown land in its own right, the Duchy of Salzburg, by resolution of 26 June 1849. Caroline Augusta of Bavaria, widow of the late Emperor Francis I of Austria, chose the city of Salzburg as her residence. According to the 1861 February Patent, the duchy received a Landtag diet. After the Austro-Hungarian Compromise of 1867, it belonged to the Cisleithanian (Austrian) part of Austria-Hungary.
With the fall of the Austro-Hungarian Monarchy in 1918, the duchy was succeeded by the state of Salzburg, part of first German Austria and then the First Austrian Republic.