A general procedure for the esterification of carboxylic acids with diazoalkanes generated in situ by the oxidation of N-tert-butyldimethylsilylhydrazones with (difluoroiodo)benzene.