thumb|300px|Map of the Swiss Confederacy during the 18th century. Member cantons are shown in green, associates in brown, condominiums in grey.

The early modern history of the Old Swiss Confederacy (Eidgenossenschaft, also known as the "Swiss Republic" or Republica Helvetiorum) and its constituent Thirteen Cantons encompasses the time of the Thirty Years' War (1618–1648) until the French invasion of 1798.

The early modern period was characterized by an increasingly aristocratic and oligarchic ruling class as well as frequent economic or religious revolts. This period came to be referred to as the Ancien Régime retrospectively, in post-Napoleonic Switzerland.

The loosely organized Confederation remained generally disorganized and crippled by the religious divisions created by the Swiss Reformation. During this period the Confederation gained formal independence from the Holy Roman Empire with support from France, and had very close relations with France.

The early modern period also saw the growth of French-Swiss literature, and notable authors of the Age of Enlightenment such as the mathematicians of the Bernoulli family and Leonhard Euler of Basel.

Thirteen Cantons

thumb|1724 depiction of the thirteen cantonal coats of arms

The Old Swiss Confederacy between phases of expansion consisted of Eight Cantons () during 1352–1481, and of the Thirteen Cantons () from 1513 until its collapse in 1798.

The Thirteen Cantons thus correspond to the sovereign territories of early modern Switzerland.

They were listed in a fixed order of precedence, first the eight, old cantons of the "Alliance of the Eight Cantons" () of the 14th century confederacy, then the five cantons which joined after the Burgundian Wars, and within these two groups, the more powerful urban cantons (, "cities") were listed first, with Zürich heading the list as the de facto Vorort of the Eight Cantons prior to the Swiss Reformation.

The order of precedence, similar but not identical to the modern order (which lists Zug after Glarus, and Basel after Solothurn), was as follows:

  1. 20px Zurich, city canton, since 1351
  2. 20px Berne, city canton, since 1353; associate since 1323
  3. 20px Lucerne, city canton, since 1332
  4. 20px Uri, founding canton (Pact of Brunnen 1315)
  5. 22px|   20px Schwyz, founding canton (Pact of Brunnen 1315)
  6. 20px   20px Unterwalden, founding canton (Pact of Brunnen 1315)
  7. 20px Zug, city canton, since 1352
  8. 21px Glarus, rural canton, since 1352
  9. 20px Basel, city canton, since 1501
  10. 20px Fribourg, city canton, since 1481; associate since 1454
  11. 20px Solothurn, city canton, since 1481; associate since 1353
  12. 20px Schaffhausen, city canton, since 1501; associate since 1454
  13. 20px Appenzell, rural canton, since 1513; associate since 1411

Symbolic depictions of the Confederacy consisted of arrangements of the thirteen cantonal coats of arms, sometimes with an additional symbol of unity, such as two clasping hands, or the "Swiss Bull" or (from the later 17th century), the Three Confederates or the Helvetia allegory.

The cantonal coats of arms were often accompanied by the coats of arms of the close associates of the confederacy, including Biel, the Imperial Abbey of St. Gallen, Imperial City of St. Gallen, the Sieben Zenden (Valais), the Three Leagues (Grisons), the Imperial City of Mulhouse, the Imperial City of Geneva and the Imperial City of Rottweil.

Thirty Years' War

The Reformation in Switzerland left the Old Swiss Confederacy divided between two hostile factions. But still, Switzerland remained a relative "oasis of peace and prosperity" (Grimmelshausen) while Europe was torn by the Thirty Years' War. The cities generally lay low and watched the destruction from afar, the Republic of Zürich investing in building state-of-the-art city ramparts. The cantons had concluded numerous mercenary contracts and defence alliances with partners on all sides. Some of these contracts neutralized each other, which allowed the confederation to remain neutral – in the 1647 Defensionale von Wil, signed under the impression of the Swedes advancing as far as Lake Constance in the winter of 1646/47, the confederates declared "permanent armed neutrality", the historical starting point of Swiss neutrality, which would be re-confirmed by the Congress of Vienna and adhered to throughout the 19th and 20th century conflicts.

thumb|220px|Religious division of the Old Confederacy during the 17th and 18th centuries

Treaty of Westphalia

At the Treaty of Westphalia in 1648, the Swiss Confederacy attained legal independence from the Holy Roman Empire, although it had been de facto independent since the Swabian War in 1499. With the support of the Duke of Orléans, who was also prince of Neuchâtel and the head of the French delegation, Johann Rudolf Wettstein, the mayor of Basel, succeeded in getting a formal exemption from the empire for all cantons and associates of the confederacy.

During the Thirty Years' War, the Drei Bünde (Graubünden, an associate state of the Swiss Confederation) had been caught in the middle of internal and external conflict. Because the Leagues were very decentralized, conflicts over religion and foreign policy broke out during the war (known as the Bündner Wirren or Confusion of the Leagues). However, as a consequence of this treaty Switzerland could do nothing when Louis XIV took Alsace (in 1648), Franche-Comté (in 1678 during the Franco-Dutch War) and Strasbourg (in 1681). However, plagues, battlefield deaths, and conflicts over the Reformation guaranteed a regular turnover in the city councils. During the early modern era, growing scientific knowledge and relative peace reduced the number of open seats in the cities.

For cities the war had brought both prosperity and new expenses. The cities required new defenses such as new bastions. During the war France and Spain had paid Pensions, the agreed sums in return for the cantons providing them with mercenary regiments. With the end of the war this money had to be replaced. Taxes were raised and new ones were created. Additionally, less valuable copper coins called Batzen were minted. The Batzen had, however, the same face value as the previously minted silver money. The population began hoarding the silver coins, and the cheap copper money that remained in circulation continually lost its purchasing power. At the end of the war, the population thus faced both a postwar depression and a high inflation, combined with high taxes. This financial crisis led to a series of tax revolts in several cantons of the Confederacy, for instance 1629–36 in Lucerne, 1641 in Bern, or 1645/46 in Zürich. The uprising in 1653 continued this series, but would take the conflict to an unprecedented level. On 31 March 1723 he mobilised 600 men and marched on Lausanne to ask the city leaders to revolt with him. However, they reported him to Bern and arrested him on the next morning. He was judged guilty of treason and beheaded.