The galvanizing industry uses the concentrated hydrochloric acid in its metal surface treatment processes known as pickling. Every year tons of waste acid solutions polluted with metals ions are discharged to the environment after neutralization process. In this study, a novel photoelectrochemical reactor is designed and developed for the production of hydrogen and chlorine gas from spent hydrochloric acid generated in the galvanizing industry. The novel reactor design allows all the hydrogen gas to flow from the reactor without any dead zone in the cathode compartment, while chlorine gas is carried out with aqueous 5 M HCl at the surface of the illuminated photoanode without any dissolution. Further, the unique design of the cathode corrosion-resistant high surface area (3 × the anode) results in good proton and H+ transfer rate while the TiO2 coated photoanode further enhances the charge transfer process and chlorine gas production. The characterization of the coated stainless steel is tested by the energy-dispersive X-ray (EDX) analysis and scanning electron microscope (SEM) images. The photoelectrochemical potentiostatic experiments with and without sunlight are performed on the reactor. The hydrogen and chlorine gas production rates are observed as 3 mL/min and 0.5 mL/min, respectively. Also, a comprehensive thermodynamic analysis of the photoelectrochemical reactor is conducted, and energy, exergy, and quantum efficiencies are found as 45.55%, 73.75%, and 6%, respectively. The exergoeconomic assessment study shows that the lowest exergy cost rate is achieved with sunlight illumination for a hydrogen exergy cost of 1.7 $/kg and chlorine exergy cost rate of 0.3 $/kg at an applied potential of 2 V.