A simple method was proposed for on-site evaluation of the pulse width of an ultraviolet femtosecond laser coupled with a mass spectrometer. This technique was based on measurement of a two-photon ionization signal in mass spectrometry by translation of the prism in the pulse compressor of the femtosecond laser. The method was applied to optical pulses that were emitted at wavelengths of 267, 241, and 219 nm; the latter two pulses were generated by four-wave Raman mixing using the third harmonic emission of a Ti:sapphire laser (267 nm) in hydrogen gas. The measurement results show that this approach is useful for evaluation of the pulse width of the ultraviolet femtosecond laser used in mass spectrometry for trace analysis of organic compounds.