2-Azidoanthracene (2N3-AN) can act as a photochemical source of N2 gas when dissolved in an optically transparent polymer such as poly(methyl methacrylate) (PMMA). Irradiation at 365 or 405 nm of a 150 μm-thick polymer film submerged in water causes the rapid appearance of a surface layer of bubbles. The rapid appearance of surface bubbles cannot be explained by normal diffusion of N2 through the polymer and likely results from internal gas pressure buildup during the reaction. For an azide concentration of 0.1 M and a light intensity of 140 mW/cm2, the yield of gas bubbles is calculated to be approximately 40%. The dynamics of bubble growth depend on the surface morphology, light intensity, and 2N3-AN concentration. A combination of nanoscale surface roughness, high azide concentration, and high light intensity is required to attain the threshold N2 gas density necessary for rapid, high-yield bubble formation. The N2 bubbles adhered to the PMMA surface and survived for days under water. The ability to generate stable gas bubbles "on demand" using light permits the demonstration of photoinduced flotation and patterned bubble arrays.