An efficient desulfurization C–O coupling reaction of 3,4-dihydropyrimidine-2(1H)-thiones (including thioureas) with alcohols was developed under electrochemical oxidation conditions. Herein, transition-metal catalysts and additives are not required and the alcohol is both the solvent and the alkoxy donor.