A floating battery is a kind of armed watercraft, often improvised or experimental, which carries heavy armament but has few other qualities as a warship.
Use of timber rafts loaded with cannon by Danish defenders of Copanhagen against bomb ketches of a combined British-Dutch-Swedish is attested by Nathaniel Uring in 1700. An early appearance was in 1782 at the Great Siege of Gibraltar, and its invention and usage is attributed to Spanish Lieutenant General Antonio Barceló.
A purpose-built floating battery was Flådebatteri No. 1, designed by Chief Engineer Henrik Gerner in 1787; it was 47 m (154 ft) long, 13 m (43 ft) wide and armed with 24 guns, and was used during the 1801 Battle of Copenhagen under the command of Peter Willemoes. The British made limited use of floating batteries during the French Revolutionary and Napoleonic Wars, with the two-vessel Musquito and Firm-class floating batteries, and some individual vessels such as HMS Redoubt.
The most notable floating batteries were built or designed in the 19th century, and are related to the development of the first steam warship and the ironclad warship.
Demologos, the first steam-propelled warship, was a floating battery designed for the protection of New York Harbor in the War of 1812.
In the 1850s, the British and French navies deployed iron-armoured floating batteries as a supplement to the wooden steam battlefleet in the Crimean War. The role of the battery was to assist unarmoured mortar and gunboats bombarding shore fortifications. The French used their batteries in 1855 against the defenses at Kinburn on the Black Sea, where they were effective against Russian shore defences. The British planned to use theirs in the Baltic Sea against Kronstadt, and may have been influential in causing the Russians to sue for peace. However, Kronstadt was widely regarded as the most heavily fortified naval arsenal in the world throughout most of the 19th-century, continually upgrading its combined defences to meet new changes in technology. Even as the British armoured-batteries were readied against Kronstadt in early 1856, the Russians had already constructed newer networks of outlying forts, mortar batteries of their own, and submarine mines against which the British had no system for removing under fire.
Traditional floating battery called kotta mara was used by the Banjar and Dayak against the Dutch during the Banjar war (1859-1906). The battery is made by adding walls (sloped and unsloped) to a raft made by large logs. Some of them shaped like a castle and had bastions with 4 cannons on each bastion. The kotta mara could resist the Dutch 30-pounder cannons until 24.5 m range, the range which the cannon could effectively penetrate it.
Floating batteries were popularly implemented by both the Union and the Confederacy during the American Civil War. The first was the Confederate Floating Battery of Charleston Harbor, which took an active part in the bombardment of Fort Sumter in April 1861. Experimental ironclad vessels that proved too cumbersome or were underpowered were often converted into floating batteries and posted for river and coastal waterway control. Here too, Civil War batteries and even ironclads such as the famed monitors, were acutely vulnerable to mines protected in turn by forts. As a result, the combined defences of Charleston, South Carolina, for example, were never overwhelmed by the Union Navy.