Leucopterin (C6H5N5O3) is the white pigment in the wings of Pieris brassicae butterflies, and other butterflies; it can also be found in wasps and other insects. Its crystal structure and its tautomeric form in the solid state were hitherto unknown. Leucopterin turned out to be a variable hydrate, with 0.5 to about 0.1 molecules of water per leucopterin molecule. Under ambient conditions, the preferred state is the hemihydrate. Initially, all attempts to grow single crystals suitable for X-ray diffraction were to no avail. Attempts to determine the crystal structure by powder diffraction using the direct-space method failed, because the trials did not include the correct, but rare, space group P2/c. Attempts were made to solve the crystal structure by a global fit to the pair distribution function (PDF-Global-Fit), as described by Prill and co-workers [Schlesinger et al. (2021). J. Appl. Cryst. 54, 776-786]. The approach worked well, but the correct structure was not found, because again the correct space group was not included. Finally, tiny single crystals of the hemihydrate could be obtained, which allowed at least the determination of the crystal symmetry and the positions of the C, N and O atoms. The tautomeric state of the hemihydrate was assessed by multinuclear solid-state NMR spectroscopy. 15N CPMAS spectra showed the presence of one NH2 and three NH groups, and one unprotonated N atom, which agreed with the 1H MAS and 13C CPMAS spectra. Independently, the tautomeric state was investigated by lattice-energy minimizations with dispersion-corrected density functional theory (DFT-D) on 17 different possible tautomers, which also included the prediction of the corresponding 1H, 13C and 15N chemical shifts in the solid. All methods showed the presence of the 2-amino-3,5,8-H tautomer. The DFT-D calculations also confirmed the crystal structure. Heating of the hemihydrate results in a slow release of water between 130 and 250 °C, as shown by differential thermal analysis and thermogravimetry (DTA-TG). Temperature-dependent powder X-ray diffraction (PXRD) showed an irreversible continuous shift of the reflections upon heating, which reveals that leucopterin is a variable hydrate. This observation was also confirmed by PXRD of samples obtained under various synthetic and drying conditions. The crystal structure of a sample with about 0.2 molecules of water per leucopterin was solved by a fit with deviating lattice parameters (FIDEL), as described by Habermehl et al. [Acta Cryst. (2022), B78, 195-213]. A local fit, starting from the structure of the hemihydrate, as well as a global fit, starting from random structures, were performed, followed by Rietveld refinements. Despite dehydration, the space group remains P2/c. In both structures (hemihydrate and variable hydrate), the leucopterin molecules are connected by 2-4 hydrogen bonds into chains, which are connected by further hydrogen bonds to neighbouring chains. The molecular packing is very efficient. The density of leucopterin hemihydrate is as high as 1.909 kg dm-3, which is one of the highest densities for organic compounds consisting of C, H, N and O only. The high density might explain the good light-scattering and opacity properties of the wings of Pieris brassicae and other butterflies.