Catalyzes the oxidation of glucose 6-phosphate to 6-phosphogluconolactone. Can utilize either NADP(+) or NAD(+). D-glucose 6-phosphate + NAD(+) = 6-phospho-D-glucono-1,5-lactone + H(+) + NADH D-glucose 6-phosphate + NADP(+) = 6-phospho-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. Homotetramer. Transcription is maximal during early logarithmic phase when inducing substrates such as glycerol, glucose or gluconate are abundant. Transcription decreases during stationary phase. Mutant is unable to grow on minimal medium supplemented with mannitol and shows increased sensitivity to the redox-active superoxide-generating agent methyl viologen (paraquat). Belongs to the glucose-6-phosphate dehydrogenase family.