Formaldehyde has been used in the inactivation of a number of viral and bacterial toxins used in vaccines. In some cases, a small amount of formaldehyde may be necessary in order to prevent reversion back to the toxic state during storage. When a lyophilized preparation is required, care must be taken to ensure that formaldehyde is not lost during the process in order to ensure safety of the product. A design of experiments (DOEs) approach was taken to devise a stable, lyophilized, vaccine formulation. A formaldehyde-inactivated bacterial toxin was used as a model antigen. Entrapment of formaldehyde in an amorphous matrix and/or interactions with amorphous components was found to be required for complete recovery of formaldehyde during lyophilization. In formulations consisting of sucrose and citrate, formaldehyde could be recovered across a wide range of excipient concentrations. Stability of the antigen was dependent on formaldehyde concentration, with antigen stability decreasing with increasing formaldehyde concentration. This is in contrast to the risk of reversion which increases with decreasing concentrations of formaldehyde. Finally, variations in temperatures during annealing, primary drying, and secondary drying had no impact on formaldehyde recovery.