1. Add excessive sodium hydroxide solution until the precipitation is complete; 2 NaOH+MgCl2 = mg (OH) 2+NaCl to remove magnesium ions.
2. Adding excessive barium chloride solution until the precipitation is complete; Removal of SO42- by BaCl2,
3. Add sodium carbonate solution until the precipitation is complete, and Na2CO3 removes CaCl2 and excess BaCl2.
4. Filtering, discarding the filtered precipitate, and taking the filtrate. At this time, there are Na2CO3 and NaOH in the filtrate.
5. Adjust the PH value with hydrochloric acid until the solution is slightly acidic.
Finally, evaporating and crystallizing to obtain sodium chloride crystals.