Together with Vatican City the only square flag in the world.
History
Before the 19th century, the Swiss did not have a common flag. When they fought in battle, soldiers carried the colours of their canton. However, since the time of the Battle of Laupen (1339) they had sewn a white cross onto their clothing in order to have a common recognition sign.
During the Helvetic period (1798 – 1803) Napoleon forbade the Swiss to wear the cross and instead made them carry a tricolour of green, red and yellow. However, when the Helvetic republic was dissolved in 1803, the tricolour went with it, and Swiss troops went back to carrying the white cross on their cantonal banner.
In 1815, after the fall of Napoleon, troops were given a federal armband to wear, which was red with a truncated white cross, and this was followed shortly afterwards by the introduction of an unofficial federal flag. This flag went to war for the first and only time in the so-called Sonderbund civil war of 1847. The war was fought between partisans of traditional values and local autonomy on the one side, and modernisers and supporters of a more centralised state on the other. With the victory of the modernisers, the Swiss flag finally became an official national symbol.
Trivia
When Switzerland joined the UN in 2002, UN protocol officials faced an unusual problem: the Swiss flag is square, but UN rules say that all flags flying at its headquarters must be oblong. Fortunately this was overridden by another rule, to the effect that a new flag may be hoisted as long as its total area does not exceed that of the regular flags.
The flag inherited its shape from the cantonal flags, which were also square. The only other square flag in the world is that of the Vatican, which was probably adopted from that of the Pope’s Swiss Guard.
The shape of the Swiss flag is not in fact laid down by law. The precise shade of red has only been set since January 1, 2007. It corresponds to pantone 485, and is a mixture of magenta and yellow. The exact shape of the cross, on the other hand, has been enshrined in law since 1889: its arms are of equal length, and are one sixth longer than they are broad.