Electrical characterization of two GaAs p þ -i-n þ mesa X-ray photodiodes over the temperature range 0 C to 120 C together with characterization of one of the diodes as an X-ray detector over the temperature range 0 Ct o6 0 C is reported as part of the development of photon counting X-ray spectroscopic systems for harsh environments. The randomly selected diodes were fully etched and unpassivated. The diodes were 200 lm in diameter and had 7 lm thick i layers. The leakage current density was found to increase from (3 6 1) nA/cm À2 at 0 C to (24.36 6 0.05) lA/ cm À2 at 120 C for D1 and from a current density smaller than the uncertainty (0.2 6 1.2) nA/cm À2 at 0 C to (9.39 6 0.02) lA/cm À2 at 120 C for D2 at the maximum investigated reverse bias (15 V). The best energy resolution (FWHM at 5.9 keV) was achieved at 5 V reverse bias, at each temperature; 730 eV at 0 C, 750 eV at 20 C, 770 eV at 40 C, and 840 eV at 60 C. It was found that the parallel white noise was the main source of the photopeak broadening only when the detector operated at 60 C, at 5 V, 10 V, and 15 V reverse bias and at long shaping times (>5 ls), whereas the sum of the dielectric noise and charge trapping noise was the dominant source of noise for all the other spectra. V C 2016 AIP Publishing LLC.[http://dx.doi.org/10.1063/1.4944892]