A facile method of the transformation of esters to vinyl compounds was developed by using the electroreductive 1,2-elimination as a key step. β-Hydroxysulfones were electrochemically reduced to vinyl compounds in good yields. Hydroxyolefins could be also prepared from the corresponding lactones.