This study details the production and analysis of undoped zinc oxide (uZnO) and boron (B) doped zinc oxide nanostructured thin films, with a specific focus on assessing the influence of varying B doping concentrations on humidity sensing performance. The synthesis of undoped ZnO and B doped ZnO nanoparticles was carried out using sol-gel method. B doping concentrations within the ZnO lattice were adjusted to 1, 3, 4, 5, and 10 mol%. Subsequently, nanostructured thin films were obtained through the spin coating technique on glass substrates. X-ray diffraction analysis revealed a hexagonal wurtzite structure for all nanostructured thin films. Notably, a change in preferential orientation from the (002) plane to the (100) plane occurred when B doping concentration exceeded 5 mol%. Scanning electron microscopy showcased nano-sized grains and capillary nanopores on the surface of each thin film. Energy dispersive X-ray spectra confirmed the presence of zinc, oxygen, and boron elements in the nanostructured thin films. Humidity sensing performance was assessed through electrical resistance measurements in the range of 45–90% relative humidity at room temperature. All fabricated sensors exhibited sensitivity to humidity. Remarkably, the sensor with a 5 mol% B doping concentration demonstrated the highest humidity sensitivity (438.44 times) and the fastest response (2.0 s) and recovery times (14.2 s). The study concluded that the optimal B doping concentration for designing a highly efficient humidity sensor was determined to be 5 mol%. Overall, the study underscores the potential of B doped ZnO nanostructures for humidity sensor applications, given their exceptional sensor performance.