Nonsteroidal anti-inflammatory drugs (NSAIDs) are commonly used to treat rheumatoid arthritis, osteoarthritis, acute pain, and fever. However, NSAIDs have side effects that include gastric erosions, ulceration, bleeding, and perforation, etc. Selective cyclooxygenase (COX)-2 inhibitors have been developed to avoid the adverse drug reaction of traditional NSAIDs. The COX-2 inhibitors have a different mechanism of action from nonselective COX inhibitors. In this study, pattern recognition analysis of the 1H nuclear magnetic resonance (NMR) spectra of urine was performed to develop surrogate biomarkers related to the gastrointestinal (GI) damage induced by NSAIDs in rats. Urine was collected for 5 h after administering the following NSAIDs at high doses: celecoxib (133 mg kg-1, po), a COX-2-selective inhibitor; and indomethacin (25 mg kg-1, po) or ibuprofen (800 mg kg-1, po), nonselective COX inhibitors. The urine was analyzed using 600 M 1H NMR for spectral binning and targeted profiling. The level of gastric damage in each animal was also determined. Indomethacin and ibuprofen caused severe gastric damage, but no lesions were observed in the celecoxib-treated rats. The 1H NMR urine spectra were divided into spectral bins (0.04 ppm) for global profiling, and 36 endogenous metabolites were assigned for targeted profiling. Multivariate data analyses were carried out to recognize the spectral pattern of endogenous metabolites related to NSAIDs using partial least-squares discrimination analysis (PLS-DA). There were different clusterings of 1H NMR spectra according to the gastric damage scores in global profiling. In targeted profiling, a few endogenous metabolites of allantoine, taurine, and dimethylamine were selected as putative biomarkers for the gastric damage induced by NSAIDs. The results of global and targeted profilings suggest that the gastric damage induced by NSAIDs can be screened in the preclinical stage of drug development using a current metabolomics study. In addition, the putative biomarkers might also be useful for predicting the risk of adverse effects caused by NSAIDs.