How to extract pure caffeine from coffee:
  1. Place 2 g instant coffee and 2 g Na2CO3 in 100 mL of water in a beaker.
  2. Heat the solution with occasional stirring for 5–10 mins.
  3. Cool the solution and decant it into a separatory funnel.
  4. Add 10 ml of methylene chloride and gently mix the two layers by inverting the funnel several times for about 5 minutes. Vigorous shaking of the funnel should be avoided as it will result in the formation of an emulsion between the two layers.
  5. Drain out the lower methylene chloride layer from the separatory funnel into an Erlenmeyer flask leaving behind any emulsion that forms.
  6. Repeat the extraction with another 5 mL of methylene chloride and add the two extracts together.
  7. Add a small amount of MgSO4 to the flask and shake it well. A clear solution indicates that it is dry.
  8. Transfer the dry solution to a weighed 25 mL RB flask and evaporate the solvent on the rotary evaporator.
  9. Determine the weight of the crude product and recrystallize it from ethanol or acetone. And there you have some pure caffeine!
Taken from CHM 151 Experiment Notes – Organic Chemistry Laboratory, Duke University, Fall 1996