Glasses of nominal composition xHfO2–(35-x)B2O3–15MgF2–35BaO, where x ranged from 0 to 0.2 mol% were fabricated using a melt-quenching technique. Structural characterization techniques, including X-ray diffraction (XRD), Fourier-transform infrared (FTIR) spectroscopy, and Raman spectroscopy, were employed to elucidate the glass network structure. The XRD patterns confirmed the amorphous nature of the studied glasses, while the FTIR and Raman spectra revealed that the incorporation of HfO2 may led to a transformation of trigonal BO3 units to tetrahedral BO4 units in the borate glass network. Deconvolution analysis of the FTIR and Raman bands provided quantitative insights into the extent of this structural rearrangement as a function of HfO2 content. UV–Vis absorption studies demonstrated that the optical bandgap of the glasses was widened with increasing HfO2 additions. This blue shift in the absorption edge was attributed to the increased formation of bridging oxygen bonds and reduced non-bridging oxygen content in the glass network. The results indicate that the studied glasses exhibit excellent compositional tunability through the incorporation of HfO2. The structural modifications and concomitant optical property enhancements suggest the potential of this glass system for various integrated photonic applications where low phonon energy and tailored transparency are highly desirable. The present work introduces a comprehensive investigation of the structural and optical property modifications in barium magnesium fluoroborate glasses induced by the addition of hafnium oxide (HfO2).