My diet:
Comparison

Magnesium chloride vs Calcium sulfate

The short answer
On a tofu package, magnesium chloride is nigari and calcium sulfate is gypsum. Both are minerals, both fit the diets we check, and both are rated generally safe. Use the one the recipe names. They are not a one-for-one swap.
Side by sideMagnesium chloride (Nigari)Calcium sulfate
Safety score90/100 Generally safe94/100 Generally safe
What it isA magnesium salt, E511Purified gypsum, E516
Usual labelMagnesium chloride or nigariCalcium sulfate or gypsum
US statusGRAS, and listed as a firming agentGRAS firming agent and flour treatment
Best known forNigari tofuChinese-style tofu and bread
Diets we checkFits all sixFits all six

Swapping one for the other

Do not swap them 1:1 in tofu. A nigari recipe and a gypsum recipe use different amounts. Follow the coagulant the recipe names.

Common questions

Which tofu coagulant is safer?

Both are minerals rated generally safe here. The choice on the package is texture and tradition, not a warning label.