Cocaine is made by extracting benzoylmethylecgonine, the tropane alkaloid that Erythroxylum coca shrubs store in their leaves, then converting it into a stable salt through a short sequence of acid-base, solvent, and crystallization steps. In the legal pharmaceutical supply, the process is a controlled extraction of the natural alkaloid; in the illicit supply, it is improvised chemistry on the same molecular skeleton. The molecule is never synthesized from scratch at scale, because farming the plant and refining its extract is cheaper than total synthesis.

The steps below explain the mechanism at the level of solubility, acid-base behavior, and intermolecular forces, because those are what actually determine yield and purity. That framing also explains why street cocaine and pharmaceutical cocaine differ so sharply despite sharing the same active molecule. What separates them is not the reaction but the engineering: purification, salt selection, drying, and dose control.

The molecule and why the plant makes it

Cocaine is a tropane alkaloid with the formula C17H21NO4 and a molecular weight of 303.35 g/mol. Its structure combines a tropane ring, a methyl ester, and a benzoyl ester. The benzoyl group is what makes the free base soluble in nonpolar organic solvents, while the tertiary amine is what makes it soluble in acidified water. That dual solubility is the entire handle by which chemists move the molecule from one phase to another.

The coca plant does not make cocaine for human convenience; it makes it as a nitrogen-containing defensive compound. Alkaloids accumulate in leaf tissue at roughly 0.5 to 1.5 percent of dry weight in cultivated coca, with variation by species, altitude, and harvest. The two main cultivated species are E. coca (Huánuco and Bolivian varieties) and E. novogranatense. Alkaloid content rises and falls with leaf age and sun exposure, which is why refiners care about harvest timing as much as chemistry.

The critical point: the plant produces the finished carbon skeleton. Refining is separation and derivatization, not construction. That is why the process is best understood as purification chemistry rather than synthetic organic chemistry.

Extraction and the acid-base shuttle

Harvested leaves are dried, then made basic, usually with lime or sodium carbonate, so the alkaloid exists as the lipid-soluble free base rather than the charged salt. The basified leaf material is washed with a nonpolar solvent such as kerosene, gasoline, or a chlorinated solvent. The free base partitions into the organic layer while sugars, chlorophyll, and water-soluble plant matter stay behind.

The organic extract is then contacted with dilute acid, typically sulfuric or hydrochloric. The acid protonates the tertiary amine, converting cocaine back into a water-soluble salt that migrates into the aqueous phase. This acid-base shuttle, base to move it into solvent, acid to move it into water, is repeated to concentrate and clean the extract. Each cycle strips away a different class of impurity, and each cycle loses some product.

Industrial refinement reports yields that depend heavily on leaf quality, solvent choice, and the number of wash cycles. The crude paste that results, sometimes called coca paste, contains cocaine base along with residual alkaloids such as ecgonine and tropacocaine. Purity at this stage is typically in the 50 to 90 percent range before further processing, and the remainder is largely other plant alkaloids and solvent residue.

Plain-language version: chemists use the molecule's two personalities, oil-loving and water-loving, to drag it back and forth between liquids, leaving impurities behind at each crossing.

From base to salt and crystal

Crude cocaine base is dissolved in a suitable solvent, commonly a ketone or an ether, and treated with hydrochloric acid. The acid protonates the amine, and cocaine hydrochloride precipitates as a white solid. This is the salt form sold as powder, and it is the form that dissolves in water and is absorbed through nasal mucosa.

The salt matters because it dictates the route of use. Cocaine hydrochloride is water-soluble and heat-labile; it decomposes when smoked rather than vaporizing intact. The free base is the opposite: it vaporizes at a much lower temperature and is the form present in crack. Converting hydrochloride back to base, usually by dissolving it in water, adding a base such as sodium bicarbonate, and heating, produces a solid that melts and crackles when heated. That physical behavior, not a different drug, is the reason crack exists.

Crystallization conditions control crystal size, which in turn controls how the powder behaves when snorted and how quickly it dissolves. Slow cooling gives larger crystals and a denser product; fast precipitation gives a fine powder with more surface area. Neither changes the molecule, but both change how it is handled and cut.

Quantified context: scale, purity, and price

Global cocaine manufacture has risen sharply over the past decade. The United Nations Office on Drugs and Crime estimated global manufacture at roughly 2,700 tons in 2022, up substantially from around 1,000 tons a decade earlier (UNODC, World Drug Report). That figure is an estimate derived from seizure and cultivation data, not a direct measurement, so treat it as an order-of-magnitude indicator.

Retail purity varies enormously by market. European seizure data have long shown mean purity above 60 percent at wholesale, while retail powders in many markets test in the 30 to 60 percent range, diluted with inert sugars, local anesthetics, or stimulants. Prices swing by region and period, so specific dollar figures should not be read as current without local seizure data. What is stable is the pattern: purity falls and price rises as you move down the distribution chain.

Parameter Crude coca paste Cocaine base (free base) Cocaine hydrochloride Pharmaceutical cocaine
Typical purity 50–90% 80–95% 60–95% (retail varies widely) ≥99% by pharmacopeial standard
Water solubility Low Very low High High
Heat behavior Decomposes Vaporizes Decomposes Decomposes
Primary route Further processing Smoked Insufflated, injected Clinical topical use
Main impurities Other alkaloids Residual alkaloids, solvent Cutting agents Controlled low levels
Legal status Illicit Illicit Illicit (except specific licensed uses) Schedule II controlled substance

The counterintuitive detail: higher purity does not mean a safer product. Potency variance between batches is the main driver of accidental overdose, because users cannot reliably judge dose from appearance or amount.

Timeline: from leaf to labeled vial

Stage Time scale What changes
Leaf harvest and drying Days to weeks Moisture drops; alkaloid content stabilizes
First extraction (basifying and solvent wash) Hours Free base moves into organic phase
Acid back-extraction Hours Salt moves into aqueous phase; impurities separate
Precipitation and drying Hours to days Crude base or paste forms
Salt formation and crystallization Hours Hydrochloride powder crystallizes
Cutting and packaging Hours to days Purity falls, variability rises
Pharmaceutical manufacturing (licensed) Days, under batch control Assay, sterility, and content uniformity verified
Analytical release testing Days Identity, potency, and impurity limits confirmed

In regulated manufacturing, the same chemical principles apply but every step is validated. Batch records, in-process controls, and finished-product assay replace the improvisation of illicit labs. The molecule is identical; the difference is documented control over identity, potency, and contaminants.

What illicit chemistry cannot control

Illicit cocaine is not merely weaker; it is chemically unpredictable. Solvent residues, reaction byproducts, and cutting agents introduce hazards unrelated to the parent drug. Levamisole, a veterinary anthelmintic, has been found in a large share of seized cocaine samples in several national monitoring programs, and it is associated with agranulocytosis and necrotizing skin lesions. Local anesthetics such as lidocaine and benzocaine are added to mimic the numbing effect, and stimulants such as caffeine or amphetamine-type compounds are added to stretch the product or adjust the effect profile.

Levamisole contamination: linked to severe neutropenia and skin necrosis; potency and presence vary batch to batch. Solvent and reagent residues: kerosene, gasoline, and acid traces can remain in poorly washed product. Fentanyl adulteration: an unpredictable, potent opioid contaminant that turns a stimulant dose into a respiratory-depression risk. Variable potency: a single batch can range from weak to several times the expected strength. Unknown cutting agents: inert sugars, talc, and local anesthetics can cause local tissue damage and systemic reactions.

Professional caveat: forensic purity data describe seizures, not the whole market. Seized samples are biased toward large shipments and interdiction targets, so neither purity nor adulterant prevalence generalizes cleanly to any individual purchase.

misconceptions about the process

The first misconception is that cocaine is "synthesized" in a lab from precursor chemicals. In reality, essentially all cocaine originates from cultivated coca; total chemical synthesis is possible but economically irrelevant at scale. The second is that crack is a different drug. It is the same molecule in free-base form, chosen because it vaporizes at smoking temperature while the hydrochloride salt does not.

The third misconception is that refining removes all plant toxins and adulterants. Crude processing removes much of the plant matrix, but illicit product is not purified to pharmaceutical standards, and post-refining cutting introduces new contaminants. The fourth is that purity can be judged by appearance, texture, or a "taste test." None of these reliably indicates potency or adulteration; only laboratory assay does.

The final misconception concerns pharmaceutical cocaine. It remains a Schedule II controlled substance in the United States and is used in a narrow set of clinical settings, chiefly topical anesthesia of mucosal surfaces where its vasoconstrictive and anesthetic properties are advantageous. Its existence shows that the chemistry is not inherently illicit; the regulatory framework, not the molecule, determines legality.

practical actions and limits

For clinicians and public health workers, the actionable points are about risk reduction and accurate counseling rather than chemistry. Ask about route of use, because route determines onset, duration, and the specific hazards. Smoking gives near-instant onset and short duration, which drives repeated dosing; intranasal use is slower and more prolonged; injection carries infection and vascular risk. Screen for adulterant-related syndromes, including unexplained neutropenia or skin lesions suggestive of levamisole exposure.

For laboratory and forensic professionals, the practical rule is that identification requires validated analytical methods. Colorimetric field tests are presumptive only and can be defeated by cutting agents. Confirmatory testing uses techniques such as gas chromatography-mass spectrometry, and quantification matters because potency variance is the primary safety variable.

For anyone encountering a suspected contaminated supply, the thresholds that matter are clinical, not chemical: any suspected fentanyl exposure, any unexplained fever with mouth ulcers or skin necrosis, and any loss of consciousness require emergency evaluation. There is no home test that reliably rules out dangerous adulterants.

Limits of what can be concluded: this article describes stable chemical mechanisms and general patterns. It does not provide synthesis instructions, dosages, or treatment plans. Specific prices, purity statistics, and adulterant prevalence change by year and region, and should be sourced from current public health and forensic monitoring rather than assumed from any single figure. The core chemistry, extraction by acid-base partitioning, salt formation, and the hydrochloride-free base distinction, is stable and well characterized (UNODC, World Drug Report; WHO Expert Committee on Drug Dependence).