Ultraporous networks of ZnO nanoparticles (UNN) have recently been proposed as a highly performing morphology for portable ultraviolet light photodetectors. Here, it is shown that structural engineering of the nanoparticle grain boundaries can drastically enhance the performance of UNN photodetectors leading to gigantic photo to dark current ratios with operation voltages below 1 V. Ultraporous nanoparticle layers are fabricated by scalable low-temperature deposition of flame-made ZnO aerosols resulting in highly transparent layers with more than 95% visible light transmittance and 80% UV-light absorption. Optimal thermally induced necking of the ZnO nanoparticles increased the photo- to dark-current ratio, at a low light density of 86 μW cm−2, from 1.4 × 104 to 9.3 × 106, the highest so far reported. This is attributed to the optimal interplay of surface depletion and carrier conduction resulting in the formation of an open-neck grain boundary morphology. These findings provide a robust set of guiding principles for the design and fabrication of nanoparticle-based optoelectronic devices.