Recent developments in ultrafine bubble generation have opened up new possibilities for applications in various fields. Herein, we investigated how substances in water affect the size distribution and stability of microbubbles generated by a common nanobubble generator. By combining light scattering techniques with optical microscopy and high-speed imaging, we were able to track the evolution of microbubbles over time during and after bubble generation. Our results showed that air injection generated a higher number of microbubbles (<10 μm) than CO2 injection. Increasing detergent concentration led to a rapid increase in the number of microbubbles generated by both air and CO2 injection and the intensity signal detected by dynamic light scattering (DLS) slightly increased. This suggested that surface-active molecules may inhibit the growth and coalescence of bubbles. In contrast, we found that salts (NaCl and Na2CO3) in water did not significantly affect the number or size distribution of bubbles. Interestingly, the presence of oil in water increased the intensity signal and we observed that the bubbles were coated with an oil layer. This may contribute to the stability of bubbles. Overall, our study sheds light on the effects of common impurities on bubble generation and provides insights for analyzing dispersed bubbles in bulk.