A novel method was developed to convert the electro-catalytically inactive commercial WO3 and SnO2 into high efficient WO3-x and SnO2-x counter electrodes for dye sensitized solar cells (DSSs) to replace Pt. Both WO3 and SnO2 was treated with Urea with different Urea mass ratio concentrations and annealed under N2 environment at 500°C. The energy conversion efficiency (PEC) was significantly improved by urea treatment with 8.57% compared to 2.91 % for non-treated CE in case of WO3 and increases from 2.76 % for non-treated CE to 8.7 % after urea treatment in case of SnO2. All other characterizations performed for urea treated WO3 and SnO2 support the hypothesis of creating oxygen vacancies inside the metal oxides by the treatment. These oxygen vacancies facilitate the redox process in iodide/trioxide electrolyte. The density of these oxygen vacancies could be controlled by controlling the urea concentration during the treatment.