 replace all C–H bonds by C–F bonds.The hydrocarbon is dissolved or suspended in liquid HF, and the mixture is electrolyzed at 5–6 V using Ni anodes.The method was first demonstrated with the preparation of perfluoropyridine () from pyridine ().