DataToolsLab
Security & Crypto Tools

Salt Generator

Generate random salts for password hashing, in hex or Base64 URL.

Loading tool…

What is Salt?

A salt generator: random bytes sized for password-hashing best practice, in your choice of encoding.

How it works

crypto.getRandomValues produces the bytes; they're rendered as hex or Base64 URL at the requested length (default 16 bytes / 128 bits).

  1. Enter your input. Type or paste your input into the field above — the tool responds instantly.
  2. Review the result. Output updates live as you type. Everything runs entirely in your browser.
  3. Copy or download. Use the Copy button to grab the result, or Download to save it as a file.

Examples

Password-hash salts

Generate a random salt — typically 16–32 bytes of crypto-random data — to prepend or append before hashing passwords.

Common mistakes

Reusing a salt

Salts must be unique per password. Reusing one lets attackers precompute tables and defeats the purpose.

Frequently asked questions

Why do passwords need salts?

Salts make identical passwords produce different hashes and break rainbow-table attacks.

How should the salt be stored?

Store it alongside the hash — the salt isn't secret; it just needs to be unique and unpredictable per password.

Online