The photophysics of gas phase pyrazole (C(3)N(2)H(4)) and 2H-1,2,3-triazole (C(2)N(3)H(3)) molecules following excitation at wavelengths in the range 230 nm>or=lambda(phot)>or=193.3 nm has been investigated using the experimental technique of H (Rydberg) atom photofragment translational spectroscopy. The findings are compared with previous studies of pyrrole (C(4)N(1)H(5)) and imidazole (C(3)N(2)H(4)), providing a guide to H atom loss dynamics in simple N-containing heterocycles. CASPT2 theoretical methods have been employed to validate these findings. Photoexcitation of pyrazole at the longest wavelengths studied is deduced to involve pi( *)<--pi excitation, but photolysis at lambda(phot)</=214 nm is characterized by rapid N-H bond fission on a (1)pisigma( *) potential energy surface. The eventual pyrazolyl radical products are formed in a range of vibrational levels associated with both the ground ((2)A(2)) and first excited ((2)B(1)) electronic states as a result of nonadiabatic coupling at large N-H bond lengths. The excitation energy of the lowest (1)pisigma( *) state of pyrazole is found to be significantly higher in energy than that of pyrrole and imidazole. Similar studies of 2H-1,2,3-triazole reveal that the lowest (1)pisigma( *) state is yet higher in energy and not accessible following excitation at lambda(phot)>or=193.3 nm. The N-H bond strength of pyrazole is determined as 37 680+/-40 cm(-1), significantly greater than that of the N-H bonds in pyrrole and imidazole. The correlation between the photochemistry of azoles and the number and position of nitrogen atoms within the ring framework is discussed in terms of molecular symmetry and orbital electron density. A photodissociation channel yielding H atoms with low kinetic energies is also clearly evident in both pyrazole and 2H-1,2,3-triazole. Companion studies of pyrazole-d(1) suggest that these slow H atoms arise primarily from the N-H site, following pi( *)<--pi excitation, and subsequent internal conversion and/or unintended multiphoton absorption processes.