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.
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.
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.