Protection of alcohols with 3,4-dihydro-2H-pyran and hydrolysis of the resulting tetrahydropyranyl ethers are cleanly performed by using an electrogenerated acid (EG acid) as a catalyst. Transesterification of glyceride was also achieved with EG acid.