Citric acid is a weak organic acid found in citrus fruits. It is a good 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 virtually all living things. It also serves as an environmentally friendly cleaning agent and acts as an antioxidant.

Pure citric acid is a white crystalline powder. Its chemical formula is C6H8O7 and the structure is:

This structure is reflected in the systematic name 2-Hydroxypropane-1,2,3-tricarboxylic acid.

The acidity of citric acid results from the three carboxy groups COOH which can lose a proton in solution. If this happens, the resulting ion is the citrate ion. Salts of citric acid containing this ion are called citrates. An important one is calcium citrate or "sour salt", which is commonly used in the preservation and flavoring of food.

Citric acid was first isolated by Carl Wilhelm Scheele in 1784 from lemon juice. Nowadays, it is produced by fermentation of sugar solution by the fungus Aspergillus niger.

UK pharmacies control the sale of Citric acid. Citric acid is a popular buffer used to increase the solubility of street heroin in Scotland. 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. See the .pdf article here. Other acidifiers used for brown heroin are ascorbic acid, acetic acid, and lactic acid: in their absence, the drug abuser will often substitute lemon juice or vinegar.

The CAS number of pure citric acid is 77-92-9.