From
http://www.erowid.org/chemicals/ghb/ghb_faq2.shtml
Lab procedure for the synthesis of GHB:
Please follow common Lab Safety procedures. Wear a lab coat and protective glasses. You will work with hot caustic solutions and solvents! Be aware of the risks associated with the manufacture of GHB! Never work alone!
Place 30 grams of pure NaOH (do not use lye!) and 100 ml of 40% ethanol in a 250 ml two-necked round-bottomed flask and swirl it and dissolve as much of the NaOH as will be dissolved in the ethanol (Caution! The dissolution of NaOH is very exothermic!). All of the NaOH won't dissolve. Add some boiling stones. Place the flask in a heating mantle (do not turn it on yet!) and fit a condenser at the top neck of the flask, I use a 20 cm Graham condenser, but any water-cooled condenser will probably suffice. Connect the cooling water supply to the condenser and start the water flow. Fit a 100 ml addition funnel in the other neck of the RB flask and pour 65 ml of gamma-butyrolactone into it. Turn on the heating mantle, and bring the NaOH/EtOH mixture to a gentle boil. When all NaOH has dissolved, begin adding the gamma-butyrolactone from the addition funnel, a little at the time, if you add too much at once, the solution will start to boil heavily and choke in the condenser.
Ideally, you should monitor the reaction with TLC, but a simple pH check with universal pH paper will suffice. When the pH comes down to 7, stop the heating. This normally occurs within an hour, probably after just half an hour. If the pH isn't down to 7 after an hour of refluxing, adjust the pH to neutral with dilute HCl or conc. citric acid. Watch out, as the addition of acid is exothermic and makes the solution boil again. You can also add some more of the lactone, and let the solution boil for another minute.
Now reduce the volume of the solution through boiling it in the flask without the condenser attached to approx. 75-100 ml. You can recover the solvent with a distillation setup here, and recondense the ethanol, water and excess butyrolactone if you wish. When the solution is down to 75 ml, the temperature of the solution is usually around 135øC. Dilute the stirred solution while still hot to 150ml with distilled water to prevent it to solidify when it returns to room temperature again. With this dilution, the dosage is around 5 ml, as it is approx. a 50% GHB solution.
The solution is perfectly clear and tastes slightly salty. It may be very slightly yellow colored, but not much if pure enough butyrolactone was used. If any neutralizing acid was used in the process, crystals of Na-citrate or NaCl may deposit in the solution, as well as the taste is severly impaired. Better dissolve some in a glass of OJ before experiencing.
An HPLC analysis on a batch made as above gave the following result:
Weight %
Na-GHB 54.4
Water 39.5
Ethanol 5.6
Lactone 0.3
Other 0.2
Some simple chemistry but with expensive equipment.
Also, regarding KOH:
Different salts:
Substituting NaOH for KOH (molarly, that is, use 42 grams of KOH in the above synth instead of NaOH) gives a similar product, and also gives users of this chemical that Potassium supplement that is by some said to be needed in connection with administration of GHB. It is not clear (for me at least) if it is the sodium intake or the GHB intake that gives the drop in plasma potassium levels. Better use a mixture of the two. Bear in mind that K-GHB is slightly less active (by weight) than Na-GHB as the K ion is heavier than the Na counterpart. Differences between K-GHB and Na-GHB is that the K salt is more soluble in water than the Na salt, and the taste is more like salt/licorice instead of the salt/soap taste of Na-GHB. In the book "Better Sex Through Chemistry" by John Morgenthaler it is pointed out that "[GHB] has a salty/licorice flavor" and it is obvious that the author tried the K salt. The purer the lactone used in the synthesis, the better the taste of the final product. LiOH or Mg(OH)2 could be dangerous to use, as would NH3 (formation of pyrrolidon). Ca(OH)2 *could* work, but I cannot find any point in using it.