I avoid using table salt because of the added nonsense they put in it. The salt I use the most is the lowest cost water softener salt available (for sodium cells), and whatever form of KCl I can get (usually water softener grade).
Since my sodium chlorate cell experiments a few years ago, I've been focusing on purifying my brine before running it in a cell.
After vacuum filtering the raw brine, I use sodium carbonate solution in sodium chloride brine (potassium carbonate solution in potassium chloride brine) which precipitates magnesium, calcium as well as iron contaminants. These precipitates are very fine and will settle, over time, to the bottom of the container (I used a 5 gallon [~19 liter] HDPE bucket). After decanting the clear brine off the fine precipitate, I test the pH. Usually it is alkaline, so treatment with dilute HCl will bring it to neutral or slightly acid where it's ready to use as fresh electrolyte. It can also be dried and stored for later use, but that takes a lot of energy input and isn't really necessary for our purposes.
Purifying the brine is a bit of work and time consuming, BUT the yield of your cells will be much higher purity and produce better colors in stars, plus be safer to use, generally (fewer compatibility problems). As I see it, if we're going to the effort and trouble of making our own oxidizers anyway, why not strive for quality at least as good as commercial, or even better!