A nail gun, nailgun or nailer is a type of tool used to drive nails into wood or some other kind of material. It is usually driven by electromagnetism, compressed air (pneumatic), highly flammable gases such as butane or propane, or, for powder-actuated tools, a small explosive charge. Nail guns have in many ways replaced hammers as tools of choice among builders.
Pneumatic nail gun in use
The first nail gun used air pressure and was introduced to the market in 1950 to speed the construction of housing floor sheathing and sub-floors. With the original nail gun the operator used it while standing and could nail 40-60 nails a minute and had a capacity of 400-600 nails. 
Nail guns do not use individual fasteners. Instead, the fasteners are mounted in long strips (similar to a stick of staples) or collated in a paper or plastic carrier, depending on the design of the nailgun. Some full head nail guns, especially those used for pallet making and roofing, use long plastic or wire collated coils. Some strip nailers use a clipped head so the nails can be placed closer together, which facilitates less frequent reloading. Clip head nails are sometimes banned by state or local building codes. Full Round Head nails provide greater resistance to pull out as do ring shank nails. Nailers may also be of the 'coil' type where the fasteners come in either wire or plastic collation the advantage being a lot more fasteners per load, however, at the expense of extra weight. Industrial nailers designed for use against steel or concrete may have a self-loading action for the explosive caps, but most require nails to be loaded by hand. Nail guns vary in the length and gauge (thickness) of nails they can drive.
Air compressor supplies air into a nail gun The smallest size of fasteners are normally 23 gauge (0.025 inches in diameter)commonly called "pin nailers" and generally have no head. They are used for attaching everything from beadings, mouldings and so forth to furniture all the way up to medium sized (7 to 8 inch) baseboard, crown molding and casing. Lengths are normally in the range to 1 in. (10 to 32 mm) although some industrial tool manufacturers supply up to 2 in. (50 mm. The 23 gauge micro pin is rapidly gaining ground as users find that it leaves a much smaller hole than brad nails, thereby eliminating the time normally taken to fill holes while at the same time presenting a far better looking finished product.
The next size up is the 18 gauge (1.22 mm diameter) fixing, often referred to as a "brad nail". These fastenings are also used to fix mouldings but can be used in the same way as the smaller 22 to 24 gauge fastenings. Their greater strength leads to their use in trim carpentry on hardwoods where some hole filling is acceptable. Whilst most 18 gauge brads have heads, some manufacturers do offer headless fastenings. Lengths range from in to 2 in. (16 mm to 50 mm)
Going up from 18 gauge fastenings the next sizes are 16 and 15 gauge (1.63 and 1.83 mm diameter). These are generally referred to as "finish nails". They come in lengths between and 2 in. (16 to 64 mm) and are used in the general fixing of much softwood and MDF trim work (such as baseboard/skirtings, architraves, etc.) where the holes will be filled and the work painted afterwards.
The largest sizes of conventional collated fastenings are the clipped head and full head nails which are used in framing, fencing and other forms of structural and exterior work. These nails generally have a shank diameter of 0.11 to 0.13 in. (2.9 to 3.1 mm) although some manufacturers offer smaller diameter nails as well. General lengths are in the range 2 in to in (50 to 90 mm). Shank styles include plain, ring annular, twisted, etc. and a variety of materials and finishes are offered including plain steel, galvanized steel, sherardised steel, stainless steel, etc. depending on the pull-out resistance, corrosion resistance, etc. required for the given application. These sizes of fastenings are available in stick collated form (often 20 to 21 for full head, 28 to 34 for clipped head) or coil form (for use in pallet/roofing nailers) depending on the application. Full-head nails have greater pull-out resistance than clipped head nails and are mandated by code in many hurricane zones for structural framing.
Another type of fastening commonly found in construction is the strap fastening which is roughly analogous to the large head clout nail. These are used in conjunction with a strap shot nailer (or positive placement nailer UK) to fix metalwork such as joist hangers, corner plates, strengthening straps, etc. to timber structures. They differ from conventional nailers in that the point of the fastening is not sheathed so it can be exactly positioned before firing the nail gun.
Other specialist nailers are also available which can drive spikes up to 6 inches long, fix wood to steel, etc.
A variation on the nail gun is the palm nailer which is a lightweight handheld pneumatic nailer that straps to the hand. It is convenient for working in tight spaces where a conventional nailer will not fit and is flexible enough to drive either short nails into metal straps or six inch nails into timber. By repeated hammer action (of around 40 hits per second) the fastener is driven into the material by a more constant palm pressure (as opposed to a conventional nailgun which drives the nail against the inertia of the nailgun itself).
In the United States, about 37,000 people every year go to emergency rooms with injuries from nail guns, according to the U.S. Centers for Disease Control (CDC). Forty percent of those injuries occur to consumers. Nail gun injuries tripled between 1991 to 2005. Foot and hand injuries are among the most common. The U.S. Consumer Product Safety Commission estimates that treating nail gun wounds costs at least $338 million per year nationally in emergency medical care, rehabilitation, and workers' compensation. Often personnel selling the tools know little about the dangers associated with their use or safety features that can prevent injuries.
Injuries to the fingers, hands, and feet are among the three most common, but there are also injuries that involve other body areas and internal organs. Some of these injuries are serious and some have resulted in death.
All kinds of nail guns can be dangerous, so safety precautions similar to those for a firearm are usually recommended for their use. For safety, nail guns are designed to be used with the muzzle touching the target. Unless specifically modified for the purpose, they are not effective as projectile weapons.
The most common firing mechanism is the dual-action contact-trip trigger, which requires that the manual trigger and nose contact element both be depressed for a nail to be discharged. The sequential-trip trigger, which is safer, requires the nose contact to be depressed before the manual trigger, rather than simultaneously with the trigger. Approximately 65% to 69% of injuries from contact-trip tools could be prevented through the use of a sequential-trip trigger, according to the CDC.
There is recoil associated with the discharge of a nail from a nail gun. Contact triggers allow the gun to fire unintended nails if the nose hits the wood surface or a previously placed nail following recoil. Nailers with touch tip (contact) triggers are susceptible to this double firing. According to a 2002 engineering report from the Consumer Products Safety Commission (CPSC), the recoil and firing of the second nail occurs well before the trigger can be released. Acute injury rates are twice as high among users of tools with contact triggers. 
In September 2011 The Occupational Safety and Health Administration (OSHA) and the National Institute for Occupational Safety and Health (NIOSH) issued a nail gun safety guide that details practical steps to prevent injuries including use of tools with sequential triggers, training prior to use, and use of appropriate protective equipment such as eye protection .
Research aimed at reducing nail gun accidents among frame carpenters, among the heaviest users of nail guns, is ongoing.
Explosive-powered ("powder actuated") nailguns fall into two broad categories:
- Direct drive or high velocity devices. This uses gas pressure acting directly on the nail to drive it.
- Indirect drive or low velocity devices. This uses gas pressure acting on a heavy piston which drives the nail. Indirect drive nailers are safer because they cannot launch a free-flying projectile even if tampered with or misused, and the lower velocity of the nails is less likely to cause explosive shattering of the work substrate.
Either type can, with the right cartridge loads, be very powerful, driving a nail or other fastener into hard concrete, stone, rolled steelwork, etc., with ease.
Image:Nail gun sweden 20030918.jpg|Pneumatic nail guns require air hoses to fire Image:nailgun open piston.jpg|In the nailgun's head, the inner chamber contains the piston assembly which drives the nail. Image:Senco nails 20050612.jpg|Nails come in clips for use in nail guns Image:blankcartridge.jpg|Cartridges, used in powder actuated nail guns
da:S mpistol de:Druckluftnagler es:Pistola de clavos fr:Cloueur nl:Nagelpistool ja: simple:Nail gun fi:Naulain sv:Spikpistol