Traditional histopathology performed by pathologists by the naked eye is insufficient for accurate and efficient diagnosis of bladder cancer (BCa). We collected 643 H&E-stained BCa images from Shanghai General Hospital and The Cancer Genome Atlas (TCGA). We constructed and cross-verified automatic diagnosis and prognosis models by performing a machine learning algorithm based on pathomics data. Our study indicated that high diagnostic efficiency of the machine learning-based diagnosis model was observed in patients with BCa, with area under the curve (AUC) values of 96.3%, 89.2%, and 94.1% in the training cohort, test cohort, and external validation cohort, respectively. Our diagnosis model also performed well in distinguishing patients with BCa from patients with glandular cystitis, with an AUC value of 93.4% in the General cohort. Significant differences were found in overall survival in TCGA cohort (hazard ratio (HR) = 2.09, 95% confidence interval (CI): 1.56-2.81, P < .0001) and the General cohort (HR = 5.32, 95% CI: 2.95-9.59, P < .0001) comparing patients with BCa of high risk vs low risk stratified by risk score, which was proved to be an independent prognostic factor for BCa. The integration nomogram based on our risk score and clinicopathologic characters displayed higher prediction accuracy than current tumor stage/grade systems, with AUC values of 77.7%, 83.8%, and 81.3% for 1-, 3-, and 5-y overall survival prediction of patients with BCa. However, prospective studies are still needed for further verifications. © 2021 The Authors. Cancer Science published by John Wiley & Sons Australia, Ltd on behalf of Japanese Cancer Association.