This study aimed to evaluate the ability of rete testis thickness (RTT) and testicular shear wave elastography (SWE) to differentiate obstructive azoospermia (OA) from nonobstructive azoospermia (NOA). We assessed 290 testes of 145 infertile males with azoospermia and 94 testes of 47 healthy volunteers at Shanghai General Hospital (Shanghai, China) between August 2019 and October 2021. The testicular volume (TV), SWE, and RTT were compared among patients with OA and NOA and healthy controls. The diagnostic performances of the three variables were evaluated using the receiver operating characteristic curve. The TV, SWE, and RTT in OA differed significantly from those in NOA (all P ≤ 0.001) but were similar to those in healthy controls. Males with OA and NOA were similar at TVs of 9–11 cm3 (P = 0.838), with sensitivity, specificity, Youden index, and area under the curve of 50.0%, 84.2%, 0.34, and 0.662 (95% confidence interval [CI]: 0.502–0.799), respectively, for SWE cut-off of 3.1 kPa; and 94.1%, 79.2%, 0.74, and 0.904 (95% CI: 0.811–0.996), respectively, for RTT cut-off of 1.6 mm. The results showed that RTT performed significantly better than SWE in differentiating OA from NOA in the TV overlap range. In conclusion, ultrasonographic RTT evaluation proved a promising diagnostic approach to differentiate OA from NOA, particularly in the TV overlap range.