In this triple-blind randomised clinical trial, we compared the effects of Withania somnifera and pentoxifylline on the sperm parameters in idiopathic male infertility. One hundred infertile male patients were randomly allocated into either W. somnifera or pentoxifylline groups. Patients in the herbal group received six capsules containing 5 g/daily of W. somnifera root, and subjects in the pentoxifylline group received six capsules containing 800 mg/daily of pentoxifylline and placebo for 90 days. Sperm parameters were analysed at the beginning and end of the study. W. somnifera increased mean sperm count (12.5%) and progressive motility (21.42%) and improved sperm morphology (25.56%) compared to the baseline (p = .04, p = .001 and p = .000 respectively). Moreover, pentoxifylline increased mean semen volume (16.46%), progressive motility (25.97%) and improved sperm morphology (13.28%) versus the baseline (p = .02, p = .003 and p = .01 respectively). Intergroup comparison showed no significant differences between the two groups regarding semen volume (p = .11), sperm count (p = .09), morphology (p = .12) and progressive motility (p = .77) after treatment. No major complication was reported in either of the two groups. W. somnifera, a traditional medicine remedy, improves sperms parameters in idiopathic male infertility without causing adverse effects. Therefore, this medication can be considered to be an alternative to pentoxifylline in this regard.