The kepi (pronˈkɛpiː ˈkeɪpiː) is a cap with a flat circular top and a peak, or visor. In English, the term is a loanword of képi, itself a re-spelled version of the Käppi, a diminutive form of Kappe, meaning "cap". In Europe, this headgear is most commonly associated with French military and police uniforms, though versions of it were widely worn by other armies during the late 19th and early 20th centuries. In North America, it is usually associated with the American Civil War, as it was worn by soldiers on both sides of the conflict.
The kepi was formerly the most common headgear in the French Army. Its predecessor originally appeared during the 1830s, in the course of the initial stages of the occupation of Algeria, as a series of various lightweight cane-framed cloth undress caps called casquette d'Afrique. These were intended as alternatives to the heavier, cloth-covered leather French Army shako. As a light and comfortable headdress, it was adopted by the metropolitan (French mainland) infantry regiments for service and daily wear, with the less practical shako being relegated to parade use. In 1852, a new soft cloth cap was introduced for campaign and off-duty. Called bonnet de police à visière, this was the first proper model of the kepi. The visor was generally squarish in shape and oversized and was referred to as bec de canard (duck bill). This kepi had no chinstrap (jugulaire). Subsequent designs reduced the size of the cap and introduced chinstraps and buttons. The kepi became well known outside France during the Crimean War and was subsequently adopted in various forms by a number of other armies (including the U.S. and Russian) during the 1860s and 1870s.
In 1870, when troops were mobilized for the Franco-Prussian War, large numbers of French soldiers either refused to wear the issued shakos or threw them away. Emperor Napoléon III abolished the infantry shako for active service and replaced it with the kepi on 30 July 1870.
In 1876, a new model appeared with a rounded visor, as the squared visor drooped when wet and curled when drying.