A headlamp or headlight (known as a head torch in the UK) is a light source affixed to the head for outdoor activities at night or in dark conditions such as caving, orienteering, hiking, skiing, backpacking, camping, mountaineering or mountain biking. Headlamps may also be used in adventure races. Headlamps are often used by workers in underground mining, search and rescue, surgeons, and by other workers who need hands-free lighting.
Headlamps are usually powered by three or four AA or AAA batteries. Systems with heavy batteries (4xAA or more) are usually designed so that the light emitter is positioned near the front of the head, with the battery compartment at the rear of the head. The headlamp is strapped to the head or helmet with an elasticized strap. It is sometimes possible to completely disconnect a headlamp's battery pack, for storage on a belt or in a pocket.
Lighter headlamp systems are strapped to the user's head by a single band; heavier ones utilize an additional band over the top of the user's head.
White LEDs were quickly adopted for use in headlamps due to their smaller size, lower power consumption and improved durability compared with incandescent bulbs.  Power LEDs rated 1 watt or more have displaced incandescent bulbs in many models of headlamps. To avoid damage to electronic parts, a heatsink is usually required for headlamps that use LEDs that dissipate more than 1W. To regulate power fed to the LEDs, DC-DC converters are often used, sometimes controlled by microprocessors. This allows the LED(s) to provide brightness that is not affected by a drop in battery voltage, and allows selectable levels of output. Following the introduction of LEDs for headlamps, sometimes combinations of LED and halogen lamps were used, allowing the user to select between the types for various tasks.
Carbide lamps were developed around 1900, and remained in use even as electric lamps appeared, because of poor battery life of the latter designs. The advent of high-efficiency LED lamps eventually displaced incandescent or combustion lamps.
Thomas Edison developed electric cap lamps for miners starting in 1914; by 1915, certain cap lamps were approved by the United States Bureau of Mines for safe use in gassy coal mines. These included features such as spring-loaded contacts to automatically disconnect broken bulbs. These lamps consisted of a reflector and incandescent lamp and a separate belt-mounted wet-cell storage battery. The battery was sized to power the lamp for the entire working shift. After 12 hours a 1917-era miner's lamp produced less than one candlepower and about 2 to 5 total lumens. This pattern became popular for similar lamps. Head lamps approved for use in coal mines are designed not to allow an internal spark to ignite flammable gas surrounding the headlamp.