Introduction Spontaneous bacterial peritonitis (SBP) is a potentially life-threatening complication of cirrhotic ascites. Early diagnosis and treatment of SBP are essential to improve the survival rates and prognosis of patients. We aimed to identify the predictors of SBP to establish a new noninvasive early diagnostic tool. Methods We screened 1,618 patients who underwent paracentesis due to cirrhotic ascites between January 2017 and December 2018 in three hospitals. We evaluated the symptomatic, clinical, and laboratory parameters to identify the predictors of SBP. The primary diagnostic model was displayed as a nomogram. Results The model included abdominal pain, diarrhea, white blood cell count, neutrophil percentage, procalcitonin, C-reactive protein, lactate dehydrogenase, Glucose, and Model for End-stage Liver Disease (MELD) score. Using a cutoff value of 0.358 points, the area under the curve, sensitivity and specificity for identifying SBP were 0.84, 0.79, and 0.74, respectively, in the learning set, 0.87, 0.82, and 0.73, respectively, in the internal verification set, and 0.90, 0.92, and 0.67, in the external verification set, respectively. Moreover, the model showed good diagnostic performance in the modeling and validation groups. The decision curve analysis confirmed the clinical utility of the nomogram model. In addition, we developed a Microsoft Excel calculation model to allow convenient adoption of the model in clinical practice. Conclusion We developed good performing diagnostic models for SBP.