Citric acid
Citric acid is a weak organic acid found in citrus fruits. It is a natural preservative and is also used to add an acidic (sour) taste to foods and soft drinks. In biochemistry, it is important as an intermediate in the citric acid cycle and therefore occurs in the metabolism of almost all living things. It also serves as an environmentally benign cleaning agent and acts as an antioxidant.
Citric acid exists in a variety of fruits and vegetables, but it is most concentrated in lemons and limes, where it can comprise as much as 8% of the dry weight of the fruit.

# Properties
At room temperature, citric acid is a white crystalline powder.  It can exist either in an anhydrous (water-free) form, or as a monohydrate.  The anhydrous form crystallizes from hot water, while the monohydrate forms when citric acid is crystallized from cold water.  The monohydrate can be converted to the anhydrous form by heating it above 74 C.  Citric acid also dissolves in absolute (anhydrous) ethanol (76 parts of citric acid per 100 parts of ethanol) at 15 degrees Celsius.
Chemically, citric acid shares the properties of other carboxylic acids.  When heated above 175 C, it decomposes through the loss of carbon dioxide and water.

# History
The discovery of citric acid has been credited to the 8th century alchemist Jabir Ibn Hayyan (Geber). Medieval scholars in Europe were aware of the acidic nature of lemon and lime juices; such knowledge is recorded in the 13th century encyclopedia Speculum Majus (The Great Mirror), compiled by Vincent of Beauvais.  Citric acid was first isolated in 1784 by the Swedish chemist Carl Wilhelm Scheele, who crystallized it from lemon juice.  Industrial-scale citric acid production began in 1860, based on the Italian citrus fruit industry.
In 1893, C. Wehmer discovered that Penicillium mold could produce citric acid from sugar. However, microbial production of citric acid did not become industrially important until World War I disrupted Italian citrus exports.  In 1917, the American food chemist James Currie discovered that certain strains of the mold Aspergillus niger could be efficient citric acid producers, and Pfizer began industrial-level production using this technique two years later.

# Production
In this production technique, which is still the major industrial route to citric acid used today, cultures of Aspergillus niger are fed on a sucrose or glucose-containing medium to produce citric acid. The source of sugar is corn steep liquor, molasses, hydrolyzed corn starch or other inexpensive sugary solutions. After the mold is filtered out of the resulting solution, citric acid is isolated by precipitating it with lime (calcium hydroxide) to yield calcium citrate salt, from which citric acid is regenerated by treatment with sulfuric acid.

# Krebs cycle
Citric acid is one of a series of compounds involved in the physiological oxidation of fats, proteins, and carbohydrates to carbon dioxide and water.
This series of chemical reactions is central to nearly all metabolic reactions, and is the source of two-thirds of the food-derived energy in higher organisms. It was discovered by the Sir Hans Adolf Krebs. Krebs received the 1953 Nobel Prize in Physiology or Medicine for the discovery. The series of reactions is known by various names, including the citric acid cycle, the Krebs cycle, and the tricarboxylic acid cycle (or TCA cycle).

# Uses

## Food additive
As a food additive, citric acid is used as a flavouring and preservative in food and beverages, especially soft drinks. It is denoted by E number E330. Citrate salts of various metals are used to deliver those minerals in a biologically available form in many dietary supplements.  The buffering properties of citrates are used to control pH in household cleaners and pharmaceuticals. In the United States the purity requirements for citric acid as a food additive is defined by the Food Chemical Codex (FCC), which is published by the United States Pharmacopoeia (USP).

## Water softening
Citric acid's ability to chelate metals makes it useful in soaps and laundry detergents.  By chelating the metals in hard water, it lets these cleaners produce foam and work better without need for water softening.  Similarly, citric acid is used to regenerate the ion exchange materials used in water softeners by stripping off the accumulated metal ions as citrate complexes.

## Others
Citric acid is used in the biotechnology and pharmaceutical industry to passivate high purity process piping (in lieu of using nitric acid). Nitric acid is considered hazardous to dispose once used for this purpose, while citric acid is not.
Citric acid is the active ingredient in some bathroom and kitchen cleaning solutions. A solution with a 6% concentration of citric acid will remove hard water stains from glass without scrubbing.  In industry it is used to dissolve rust from steel.
Citric acid is commonly used as a buffer to increase the solubility of brown heroin. Single-use citric acid sachets have been used as an inducement to get heroin users to exchange their dirty needles for clean needles in an attempt to decrease the spread of AIDS and hepatitis.  Other acidifiers used for brown heroin are ascorbic acid, acetic acid, and lactic acid; in their absence, a drug user will often substitute lemon juice or vinegar.
Citric acid is one of the chemicals required for the synthesis of HMTD, a highly heat-, friction-, and shock-sensitive explosive similar to acetone peroxide. Purchases of large quantities of citric acid may rouse suspicion of potential terrorist activity.
Citric acid can be added to ice cream to keep fat globules separate, and can be added to recipes in place of fresh lemon juice as well. Citric acid is used along with sodium bicarbonate in a wide range of effervescent formulae, both for ingestion (e.g., powders and tablets) and for personal care (e.g., bath salts, bath bombs, and cleaning of grease).
When applied to hair, citric acid opens up the outer layer, also known as the cuticle. While the cuticle is open, it allows for a deeper penetration into the hair shaft. It can be used in shampoo to wash out wax and coloring from the hair. It is notably used in the product "Sun-in" for bleaching, but is generally not recommended due to the amount of damage it causes.
Citric acid is also used as a stop bath in photography. The developer is normally alkaline, so a mild acid will neutralize it, increasing the effectiveness of the stop bath when compared to plain water.

# Safety
Citric acid is recognized as safe for use in food by all major national and international food regulatory agencies.  It is naturally present in almost all forms of life, and excess citric acid is readily metabolized and eliminated from the body.
Interestingly, despite its ubiquity in the body, intolerance to citric acid in the diet is known to exist. Little information is available as the condition appears to be rare, but like other types of food intolerance it is often described as a "pseudo-allergic" reaction.
Contact with dry citric acid or with concentrated solutions can result in skin and eye irritation, so protective clothing should be worn when handling these materials.
Excessive consumption is capable of eroding the tooth enamel.
Close contact to the eyes can cause a slight burning sensation, and may cause loss of sight.

## Cancer claims
There have been erroneous reports that E330 is a major cause of cancer. It is thought that this has been brought about by misunderstanding and confusion over the word Krebs. In this case, it refers to Sir Hans Adolf Krebs, discoverer of the Krebs cycle, and not the German word for cancer. Citric acid is not known to be harmful to the body when taken alone.