Work out salt length requirement instantly with clear inputs, formula shown and shareable results.
A salt does not need to be secret, only unique. Its job is to ensure that identical passwords hash differently, which defeats precomputed tables and stops an attacker cracking one hash and matching it across accounts. NIST SP 800-132 recommends at least 128 bits, and the birthday bound shows why: at 64 bits, ten million users already have a non-trivial chance of a repeat.
Salt uniqueness
salt bits = bytes x 8; distinct values = 2^bits; P(duplicate) ~ 1 - exp(-users^2 / (2 x 2^bits))
No. It is stored alongside the hash. A secret value added separately is called a pepper and is an additional defence, not a replacement for the salt.
No. Usernames repeat across sites and are predictable, so an attacker can precompute tables for common accounts. Use a cryptographically random salt per credential.