Bifunctional enzyme localized in the lumen of the endoplasmic reticulum that catalyzes the first two steps of the oxidative branch of the pentose phosphate pathway/shunt, an alternative to glycolysis and a major source of reducing power and metabolic intermediates for biosynthetic processes (By similarity). Has a hexose-6-phosphate dehydrogenase activity, with broad substrate specificity compared to glucose-6-phosphate 1-dehydrogenase/G6PD, and catalyzes the first step of the pentose phosphate pathway (PubMed:12858176, PubMed:18628520, PubMed:23132696). In addition, acts as a 6-phosphogluconolactonase and catalyzes the second step of the pentose phosphate pathway (By similarity). May have a dehydrogenase activity for alternative substrates including glucosamine 6-phosphate and glucose 6-sulfate (By similarity). The main function of this enzyme is to provide reducing equivalents such as NADPH to maintain the adequate levels of reductive cofactors in the oxidizing environment of the endoplasmic reticulum (PubMed:12858176, PubMed:18628520, PubMed:23132696). By producing NADPH that is needed by reductases of the lumen of the endoplasmic reticulum like corticosteroid 11-beta-dehydrogenase isozyme 1/HSD11B1, indirectly regulates their activity (PubMed:18628520). D-glucose 6-phosphate + NADP(+) = 6-phospho-D-glucono-1,5-lactone + H(+) + NADPH D-glucose 6-phosphate + NAD(+) = 6-phospho-D-glucono-1,5-lactone + H(+) + NADH 6-phospho-D-glucono-1,5-lactone + H2O = 6-phospho-D-gluconate + H(+) 2-deoxy-D-glucose 6-phosphate + NAD(+) = 2-deoxy-6-phospho-D-glucono-1,5-lactone + H(+) + NADH 2-deoxy-D-glucose 6-phosphate + NADP(+) = 2-deoxy-6-phospho-D-glucono-1,5-lactone + H(+) + NADPH D-galactose 6-phosphate + NADP(+) = 6-phospho-D-galactono-1,5-lactone + H(+) + NADPH D-galactose 6-phosphate + NAD(+) = 6-phospho-D-galactono-1,5-lactone + H(+) + NADH D-glucosamine 6-phosphate + NADP(+) = 2-amino-2-deoxy-6-phospho-D-glucono-1,5-lactone + 2 H(+) + NADPH D-glucose + NAD(+) = D-glucono-1,5-lactone + H(+) + NADH D-glucose + NADP(+) = D-glucono-1,5-lactone + H(+) + NADPH D-glucose 6-sulfate + NADP(+) = 6-sulfo-D-glucono-1,5-lactone + H(+) + NADPH Carbohydrate degradation; pentose phosphate pathway; D-ribulose 5-phosphate from D-glucose 6-phosphate (oxidative stage): step 1/3. Carbohydrate degradation; pentose phosphate pathway; D-ribulose 5-phosphate from D-glucose 6-phosphate (oxidative stage): step 2/3. Carbohydrate degradation; pentose phosphate pathway; D-ribulose 5-phosphate from D-glucose 6-phosphate (oxidative stage). Homodimer. Present in most tissues examined, strongest in liver. The disease is caused by variants affecting the gene represented in this entry. In the N-terminal section; belongs to the glucose-6-phosphate dehydrogenase family. In the C-terminal section; belongs to the glucosamine/galactosamine-6-phosphate isomerase family. 6-phosphogluconolactonase subfamily. The Singapore human mutation and polymorphism database