In this study, guar gum and polyvinyl alcohol(PVA) polymer electrolytes are prepared using solution casting method. The films are characterized using X-ray diffraction (XRD), Fourier-transform infrared spectroscopy (FTIR), electrochemical impedance spectroscopy (EIS), and UV–visible spectroscopy. XRD analysis indicates that the films have amorphous structure, and FTIR spectroscopy is used to identify the functional groups and interactions between the polymers and magnesium chloride (MgCl2) salt. The FTIR spectra show clear absorption bands indicating successful integration and interaction within the blend. EIS measurements reveal that the ionic conductivity of the electrolyte film is reached upto 3.3 × 10−4 S/cm at a concentration of 0.4 g MgCl2 in the blend. This significant ionic conductivity suggests that Guar gum:PVA blend has promising potential as a polymer electrolyte in electrochemical applications. UV–visible spectroscopy reveals the band gap of 2.58 eV, refractive index, and Urbach energy value of 0.32 eV for the prepared electrolyte. These results suggest that Guar gum:PVA:MgCl2 polymer electrolytes offer promising prospects as efficient material for advancing sustainable energy solutions.