The present invention relates to a method of forming diazoalkanes. One aspect of the present invention provides a method for the production of a N-alkyl-N-nitroso compound from a starting material, comprising the use of a tribasic acid to acidify an amine. A second aspect of the present invention provides a method for the production of a diazoalkane, comprising reacting a N-alkyl-N-nitroso compound with a base and a phase transfer catalyst, wherein no organic solvent is used.