The Zollverein (German Customs Union) begins the first regular census in Germany.

The Zollverein (pronounced [ˈtsɔlfɛɐ̯ˌʔaɪn]), or German Customs Union, was a coalition of German states formed to manage tariffs and economic policies within their territories. Organized by the 1833 Zollverein treaties, it formally started on 1 January 1834. However, its foundations had been in development from 1818 with the creation of a variety of custom unions among the German states. By 1866, the Zollverein included most of the German states. The Zollverein was no part of the German Confederation (1815-1866).

The foundation of the Zollverein was the first instance in history in which independent states consummated a full economic union without the simultaneous creation of a political federation or union.Prussia was the primary driver behind the creation of the customs union. Austria was excluded from the Zollverein because of its highly protected industry and also because Prince von Metternich was against the idea. By the founding of the North German Confederation in 1867, the Zollverein covered states of approximately 425,000 square kilometres (164,000 sq mi), and had produced economic agreements with several non-German states, including Sweden–Norway. After the founding of the German Empire in 1871, the Empire assumed the control of the customs union. However, not all states within the Empire were part of the Zollverein until 1888 (Hamburg for example). Conversely, though Luxembourg was a state independent of the German Reich, it remained in the Zollverein until 1919.

The splintering of territory and states over generations meant that by the 1790s in the German-speaking Holy Roman Empire in Central Europe, there were approximately 1800 customs barriers. Even within the Prussian state itself, there were, at the beginning of the 19th century, more than 67 local customs and tariffs, with as many customs borders. To travel from Königsberg in East Prussia to Cologne, for example, a shipment was inspected and taxed about 80 times. Each customs inspection at each border slowed the shipment's progress from source to destination, and each assessment on the shipment reduced profit and increased the price of goods, dramatically stifling trade.

When France defeated the Second Coalition, made up of Russian, Austrian and German forces, and annexed territories up to the Rhine, there was a general consolidation of the myriad of tiny states in Germany in the Mediatization of 1803. This was also called the Principal Conclusion of the Extraordinary Imperial Delegation (or, in German, Hauptschluss der außerordentlichen Reichsdeputation, usually called the Reichsdeputationshauptschluss). This last piece of major legislation enacted by the Holy Roman Empire re-arranged the map of Central Europe, especially in the southwestern territories. The Reichshauptschluss resulted in the secularization of many ecclesiastical territories, and the so-called mediatization, i.e. the annexation to larger neighboring territories, of many of the formerly free imperial territories, including most of the imperial cities. Considerable portions of the Habsburg family territories in southwestern Central Europe were "mediatized", or given as compensation, to the princes and dukes who had lost territories in the French expansion. Most of the imperial cities, imperial abbeys, and ecclesiastical states and cities were mediatized or secularized in 1803. With the final dissolution of the Holy Roman Empire in 1806, most of the remaining tiny principalities were annexed by larger neighbors.

Historians have analyzed three Prussian goals in the development of the Zollverein: first, as a political tool to eliminate Austrian influence in Germany; second, as a way to improve the economies; and third, to strengthen Germany against potential French aggression while reducing the economic independence of smaller states. The Zollverein created a larger market for German-made farm and handicraft products and promoted commercial unification under fiscally sound economic parameters. While the Union sought to limit trade and commercial barriers between and among member states, it continued to uphold the protectionist barriers against outsiders.

According to economic historian Florian Ploeckl, the commonly accepted view among economic historians is that Prussia was motivated to create Zollverein in order to achieve economies of scale in customs administration, thus leading to substantial fiscal savings.