An ion mobility spectrometer (IMS) with an electrospray ion source is used to investigate photo and thermal isomerization of photoactive molecules in the electrospray syringe. A light emitting diode adjacent to the syringe establishes a photostationary state that relaxes thermally toward the more stable isomer once illumination ceases. The arrangement is demonstrated by measuring Z−E thermal isomerization rates for several azoheteroarene compounds. The IMS technique has a distinct advantage over UV−vis spectrophotometry for measuring isomer populations in situations where there are multiple isomers with overlapping absorption profiles. In another development, an LED array adjacent to the silica capillary connecting the syringe to the electrospray ion source, is used to activate photochromic molecules, and investigate sequential photoswitching events.