On a commercial scale, metallic sodium is made by electrolysis of molten sodium chloride. With temperatures pushing 800°C and currents in the kiloamp range, it’s not exactly DIY-friendly.
The solution contains chlorine, which is created through electrolysis ... the energized plates and a chemical reaction splits the sodium from the chlorine. A twelve volt power source is necessary ...