Catalyzes the NADPH-dependent reduction of several pentoses, tetroses, trioses, alpha-dicarbonyl compounds and L-xylulose. Participates in the uronate cycle of glucose metabolism. May play a role in the water absorption and cellular osmoregulation in the proximal renal tubules by producing xylitol, an osmolyte, thereby preventing osmolytic stress from occurring in the renal tubules.