Dye-sensitized solar cells (DSSCs) are becoming increasingly popular as low-cost organic photovoltaic devices due to their ease of fabrication and affordability. However, a primary limitation of DSSCs is their inability to absorb the entire solar spectrum, leading to lower efficiency. To overcome this limitation, a study was conducted to investigate the use of co-sensitization with two dyes that absorb different wavelengths of light to enhance the overall light absorption. In this study, four novel donor-acceptor (D-A) dyes (5a-d) containing benzo-1,4-diazine or benzo-1,4-oxazine groups as donors and a carbonyl group as an anchor were synthesized using a green and sustainable method to be used as co-sensitizers in DSSCs. These photosensitizers were co-sensitized with the Ru(II) dye N719 and were observed to significantly improve the light-harvesting ability of the device. The co-sensitizers (5a-d) reduced charge recombination, inhibiting dye aggregation, and increased dye loading on the TiO2 photoanode, leading to improve the overall device performance because of the appropriate molecular volume structures of (5a-d), which can fill the adsorption gap between N719 dye. The DSSC device of N719 showed a power conversion efficiency (PCE) of 7.81 % (JSC = 19.06 mA cm−2, VOC = 0.65 V, and FF = 61.24%). After co-sensitization, the PCE and short-circuit current of the device were significantly improved to reach (PCE = 8.79, JSC = 22.89 mA cm−2 and VOC = 0.68 V for 5a), (PCE = 8.56%, JSC = 22.37 mA cm−2, and VOC = 0.68 V mA cm−2 for 5b), (PCE = 8.59%, JSC = 22.45 mA cm−2, and VOC = 0.67 V for 5c) and (PCE = 8.50%, JSC = 21.93 mA cm−2, and VOC = 0.67 V for 5d). These findings demonstrate that co-sensitization with these novel dyes can compensate for the absorption defects of the Ru(II) dye and suppress charge recombination, leading to enhanced overall PCE in DSSCs.