Chemical drain cleaners
Chemical drain cleaners or openers are pure or mixtures of chemicals used to unclog drains that are blocked by hair, food, or other organic materials. They are often accompanied by other mechanical drain cleaners for the optimal effect. Chemical drain cleaners are available through hardware stores, although some may be intended for use by licensed plumbers. They may contain either strong acids (in liquid forms) or strong alkalis (in either solid or liquid forms). These cleaners contain chemicals that dissolve at least some of the material causing the clog. History 
The history of drain cleaners parallels the development of common drain systems themselves. As a result, there is not an extensive history of cleaners in the US, as municipal plumbing systems were not readily available in middle-class American homes until the early 20th century. Prior to this time, Americans often discarded the dirty water collected in basins after use. Limited piping systems gradually developed with lead materials, but after WWI when the poisonous properties of lead became more well-known, piping was reconstructed with galvanized iron. Galvanized iron is actually steel covered in a protective layer of zinc, but it was soon discovered that this zinc layer naturally corroded due to exposure to the atmosphere and rainwater, as well as cement, runoff, etc. Once corrosion occurred down to the base metal, plaques and rust would form, leading to sediment build-up that would gradually clog these drains. Thus, the first motivation for drain cleaners came to be. The struggle against corroding galvanized iron pipes eventually led to a replacement by copper or plastic (PVC) piping by the 1960s. Copper and plastic do not possess that zinc layer that naturally corrodes to expose the base metal to decay. Natural substances such as hair, grease, or other oils continued to be an issue in drain clogs requiring, in turn, the development of more effective chemical drain cleaners. Acidic drain openers

Acidic drain cleaners usually contain sulfuric acid at high concentrations. It can dissolve cellulose, proteins like hair, and fats via acid hydrolysis. Potential hazards include violent reactions with water and the production of explosive hydrogen vapors upon contact with most metals; chronic (delayed) and acute (immediate) health hazards if inhaled, ingested, or contacted, including severe eye, flesh and skin burns or even permanent visual loss, inflammation of respiratory membranes, and corrosive burns to all human tissue. It may even be fatal if swallowed. Due to the vigorous reaction between the acid and water, such acidic drain openers should be added slowly into the pipe to be cleaned. Acidic drain openers (in very high concentrations) hydrolyze proteins and fats via acid hydrolysis (acid-catalyzed hydrolysis), similar to their alkaline versions:
RCONH2(amide or proteins) + H3O+ → NH4+  +  RCOOH

RCO2R'(ester or fats) + H2O → RCO2H + R'OH

Concentrated sulfuric acid dehydrates substances containing carbohydrates, like tissue paper which consists of cellulose:
()n → 6n C + 5n

Alkaline drain openers

Alkaline drain openers primarily contain sodium hydroxide (lye) and some may contain potassium hydroxide. They may appear in liquid or solid form. Solid formulations of corrosive alkaline drain cleaners are composed of a caustic substance (often sodium hydroxide or potassium hydroxide), aluminum particles, and 'additives.' These additives often include wetting agents such as alkyl aryl sulfonates, but the exact nature of these additives are not known for commercial drain cleaners, as they are regarded as the trade secrets that make each drain cleaner unique to its brand. The aluminum granules that are included in the solid caustic drain cleaner release hydrogen gas. The corresponding reactions are shown below. Because the release of hydrogen gas is overall an exothermic reaction, the extra heat released helps to break down the greases, oils, etc. that form the clog. 1. Breakdown of aluminum oxide:  Al2O3 + 2NaOH + 3H2O → 

2. Oxidation of aluminum metal:   2Al + 2NaOH + 6H2O →  + 3H2

The actual breakdown of a clog occurs by reaction with the hydroxide ions (OH−) from the drain cleaner. Clogs are often composed of natural substances such as hair, fats, oils, etc. and breakdown occurs via a saponification reaction of a base and triglyceride. The hydroxide ions from the dissolution of lye in water attack the carbonyl carbons of the fat, which eventually kicks off the hydrophobic tails of the triglyceride (e.g. glyceryl trioleate) to isolate glycerol and a fatty acid salt. Alkaline drain openers can dissolve hair (containing proteins) and fats inside pipes via alkaline hydrolysis of amide and ester functionalities respectively:
RCONH2 (amide or proteins)+  OH− → NH3  +  RCOO−
RCO2R’ (ester or fats)+  OH− → R'OH  +  RCOO−

Because solid lye is hygroscopic, it is crucial that the solid granules of the cleaner are placed directly in proximity to the clog. Otherwise, the lye itself will absorb water and actually create a mass itself, exacerbating the clog issue. Liquid formulations of corrosive alkaline drain cleaners can contain sodium hypochlorite (bleach) and lye (sodium hydroxide or potassium hydroxide) in concentrations up to 50 percent. Other corrosive mixtures come as two-part cleaners that are mixed as they are poured in the drain opening. Inside the drain the two solutions react to release a gas, and surfactants trap the gas as dense foam. The intent of this foaming action is to coat the inside of the drain pipe to dislodge more of the substances that form the clog. Because liquid alkaline drain cleaners are essentially a base dissolved in water, this is denser than water and can sink to the source of the clog. Usage considerations 
Advantages of chemical drain cleaners include ready availability of some formulations through retailer stores and potential ease of use for removing soft hair and grease clogs that accumulate close the drain openings. Disadvantages of chemical drain cleaners include a lack of effectiveness for removing clogs far from the drain opening (for example, clogs that occur in toilets or in the main sewer drain), an inability to remove most solid obstructions, and the safety considerations outlined below. Strongly corrosive and acid drain cleaners are among the most hazardous household products available to the public. Chemical drain cleaners can cause strong reactions—sometimes explosively—with other chemicals that may have been used previously, which can result in serious injury to anyone in the vicinity. In one such incident, a five-year-old boy was left scarred for life after an acidic drain cleaner leaked through his bedroom ceiling as he slept. Strong alkali drain cleaners are equally capable of causing rapid, severe burns. Such burns have been seen in the cases of a woman doused with concentrated lye in an attack. A small girl was also permanently disfigured by a common lye drain opener. Moreover, because the acidic or basic drain cleaners themselves are washed down the drain, this contributes to pollution in the water supply. Drain cleaners usually contain a strong base such as sodium hydroxide that decomposes hair and converts fats into water-soluble products. The reaction is exothermic, releasing heat to soften the fats. Drain cleaners can also contain aluminum, which reacts with sodium hydroxide to produce bubbles of hydrogen gas that help to break up the clog. The pressure buildup by gas generation can cause weaker pipes to burst, and the heat generation can also soften plastic PVC pipes. Plumbers must take special care to avoid injury when working on pipes which may contain corrosive drain cleaners, and may charge extra for such hazardous work. At times, individuals may deliberately or unknowingly mix two different types of drain cleaners, which can lead to even deadlier results from poisonous fumes. References

Household chemicals
Plumbing