We study the dust present in 56 Galactic planetary nebulae (PNe) through their iron depletion factors, their C/O abundance ratios (in 51 objects), and the dust features that appear in their infrared spectra (for 33 objects). Our sample objects have deep optical spectra of good quality, and most of them also have ultraviolet observations. We use these observations to derive the iron abundances and the C/O abundance ratios in a homogeneous way for all the objects. We compile detections of infrared dust features from the literature and we analyze the available Spitzer/IRS spectra. Most of the PNe have C/O ratios below one and show crystalline silicates in their infrared spectra. The PNe with silicates have C/O < 1, with the exception of Cn 1-5. Most of the PNe with dust features related to C-rich environments (SiC or the 30 {mu}m feature usually associated to MgS) have C/O $gtrsim$ 0.8. PAHs are detected over the full range of C/O values, including 6 objects that also show silicates. Iron abundances are low in all the objects, implying that more than 90% of their iron atoms are deposited into dust grains. The range of iron depletions in the sample covers about two orders of magnitude, and we find that the highest depletion factors are found in C-rich objects with SiC or the 30 {mu}m feature in their infrared spectra, whereas some of the O-rich objects with silicates show the lowest depletion factors.