Early development drug formulation is exacerbated by increasingly poor bioavailability of potential candidates. Prevention of attrition due to formulation problems necessitates physicochemical analysis and formulation studies at a very early stage during development, where the availability of a new substance is limited to small quantities, thus impeding extensive experiments. Miniaturization of common formulation processes is a strategy to overcome those limitations. We present a versatile technique for fabricating drug nanoformulations using a microfluidic spray dryer. Nanoparticles are formed by evaporative precipitation of the drug-loaded spray in air at room temperature. Using danazol as a model drug, amorphous nanoparticles of 20-60 nm in diameter are prepared with a narrow size distribution. We design the device with a geometry that allows the injection of two separate solvent streams, thus enabling co-spray drying of two substances for the production of drug co-precipitates with tailor-made composition for optimization of therapeutic efficiency.