Fluorine is normally made by electrolysis. Hydrogen fluoride is dissolved in potassium fluoride. This mixture is melted and an electric current is passed through it. This is electrolysis. Hydrogen is produced at one side and fluorine at the other side. If the sides are not separated, the cell may explode.