We tried to develop a library search system using a portable, attenuated total reflection Fourier transform infrared (ATR-FT-IR) spectrometer for on-site identification of 3,4-methylenedioxymethamphetamine (MDMA) and 3,4-methylenedioxyamphetamine (MDA) tablets. The library consisted of the spectra from mixtures of controlled drugs (e.g. MDMA and ketamine), adulterants (e.g. caffeine), and diluents (e.g. lactose). In the seven library search algorithms, the derivative correlation coefficient showed the best discriminant capability. This was enhanced by segmentation of the search area. The optimized search algorithm was validated by the positive (n=154, e.g. the standard mixtures containing the controlled drug, and the MDMA/MDA tablets confiscated) and negative samples (n=56, e.g. medicinal tablets). All validation samples except for four were judged truly. Final criteria for positive identification were decided on the basis of the results of the validation. In conclusion, a portable ATR-FT-IR spectrometer with our library search system would be a useful tool for on-site identification of amphetamine-type stimulant tablets.