Halogenation
In chemistry, halogenation is a chemical reaction that entails the introduction of one or more halogens into a compound. Halide-containing compounds are pervasive, making this type of transformation important, e.g. in the production of polymers, drugs. This kind of conversion is in fact so common that a comprehensive overview is challenging. This article mainly deals with halogenation using elemental halogens (). Halides are also commonly introduced using salts of the halides and halogen acids. Many specialized reagents exist for and introducing halogens into diverse substrates, e.g. thionyl chloride.

Organic chemistry
Several pathways exist for the halogenation of organic compounds, including free radical halogenation, ketone halogenation, electrophilic halogenation, and halogen addition reaction. The nature of the substrate determines the pathway. The facility of halogenation is influenced by the halogen. Fluorine and chlorine are more electrophilic and are more aggressive halogenating agents. Bromine is a weaker halogenating agent than both fluorine and chlorine, while iodine is the least reactive of them all. The facility of dehydrohalogenation follows the reverse trend: iodine is most easily removed from organic compounds, and organofluorine compounds are highly stable.

Free radical halogenation 
Halogenation of saturated hydrocarbons is a substitution reaction. The reaction typically requires free radical pathways. The regiochemistry of the halogenation of alkanes is largely determined by the relative weakness of the C–H bonds. This trend is reflected by the faster reaction at tertiary and secondary positions. 

Fluorinations with elemental fluorine () are particularly exothermic, so much so that highly specialised conditions and apparatus are required. The method electrochemical fluorination generates small amounts of elemental fluorine in situ from hydrogen fluoride. The method avoids the hazards of handling fluorine gas. Many commercially important organic compounds are fluorinated using this technology. Aside from  and its electrochemically generated equivalent, cobalt(III) fluoride is used as sources of fluorine radicals.

Free radical chlorination is used for the industrial production of some solvents:

Naturally-occurring organobromine compounds are usually produced by free radical pathway catalyzed by the enzyme bromoperoxidase. The reaction requires bromide in combination with oxygen as an oxidant. The oceans are estimated to release 1–2 million tons of bromoform and 56,000 tons of bromomethane annually.

The iodoform reaction, which involves degradation of methyl ketones, proceeds by the free radical iodination.

Addition of halogens to alkenes and alkynes 
Unsaturated compounds, especially alkenes and alkynes, add halogens:

In oxychlorination, the combination of hydrogen chloride and oxygen serves as the equivalent of chlorine, as illustrated by this route to 1,2-dichloroethane:

The addition of halogens to alkenes proceeds via intermediate halonium ions. In special cases, such intermediates have been isolated.

Bromination is more selective than chlorination because the reaction is less exothermic. Illustrative of the bromination of an alkene is the route to the anesthetic halothane from trichloroethylene:

Iodination and bromination can be effected by the addition of iodine and bromine to alkenes. The reaction, which conveniently proceeds with the discharge of the color of , is the basis of the analytical method. The iodine number and bromine number are measures of the degree of unsaturation for fats and other organic compounds.

Halogenation of aromatic compounds

Aromatic compounds are subject to electrophilic halogenation:

This kind of reaction typically works well for chlorine and bromine. Often a Lewis acidic catalyst is used, such as ferric chloride. Many detailed procedures are available.
Because fluorine is so reactive, other methods, such as the Balz–Schiemann reaction, are used to prepare fluorinated aromatic compounds.

Other halogenation methods
In the Hunsdiecker reaction, carboxylic acids are converted to organic halide, whose carbon chain is shortened by one carbon atom with respect to the carbon chain of the particular carboxylic acid. The carboxylic acid is first converted to its silver salt, which is then oxidized with halogen:

Many organometallic compounds react with halogens to give the organic halide:

Inorganic chemistry
All elements aside from argon, neon, and helium form fluorides by direct reaction with fluorine. Chlorine is slightly more selective, but still reacts with most metals and heavier nonmetals. Following the usual trend, bromine is less reactive and iodine least of all. Of the many reactions possible, illustrative is the formation of gold(III) chloride by the chlorination of gold. The chlorination of metals is usually not very important industrially since the chlorides are more easily made from the oxides and the hydrogen chloride. Where chlorination of inorganic compounds is practiced on a relatively large scale is for the production of phosphorus trichloride and disulfur dichloride.

See also

Dehalogenation
Haloalkane (Alkyl halide)
Halogenoarene (Aryl halide)
Free radical halogenation
Haloketone
Electrophilic substitution

References

Halogenation reactions
Organic reactions
Inorganic reactions
Halogens