The selective displacement of formyl hydrogen (-(C=O)-H) to fluorine in aliphatic aldehydes was successfully carried out electrochemically to give acyl fluorides in base-nHF (base: pyridine or Et(3)N, n=3-6) electrolyte solution with or without solvents such as acetonitrile and sulfolane.