Free online dedicated toolsWeb Crypto · Data is not uploaded

Random salt generator

The random salt generator uses browser Web Crypto to create 8 to 256 bytes of random data, which is then encoded into Hex, Base64, or no-padding Base64URL. The salt does not need to be kept secret, but must be unique for each credential. Modern Argon2id, bcrypt, scrypt, and PBKDF2 libraries often generate and save salts automatically, and production environments should prefer the library's built-in process.

free onlineRun locallyWeb Cryptosafe random

Get started with the random salt generator

Set the raw byte count and encoding to batch generate unique random salt values ​​for password hash testing.

readyAfter completing the settings, click the main operation button

The salt value should be unique for each credential and can be stored with the hash; production environments prefer to use a password hashing library to automatically generate and manage salt values.

recent records

Records are only saved in the current browser and can be cleared at any time.

Instructions for use

Three steps to get started

01

Set the number of bytes

Set the raw random salt length as required by the password hashing library or protocol, default is 16 bytes.

02

Select encoding

Hex facilitates database and log viewing; Base64 and Base64URL are more compact.

03

Hand over to hash library

Use unique salts with slow password hashing algorithms and don't mistake the salt for a secret key.

FAQ

Random Salt Generator FAQ

Does the salt value need to be kept secret?

Usually not required. The salt value can be stored along with the password hash, the key is to use a unique and unpredictable random salt value for each credential.

What is the difference between salt and pepper?

The salt is unique to each credential and can be stored publicly; the pepper is a system-level secret and should be kept in the key management system separately from the database.

How many bytes should be chosen?

The specifications of the target algorithm and library should prevail. Pages default to 16 bytes, which is sufficient to provide a large space for unique values, but automatic configuration of a mature password hashing library takes precedence.

Can I directly use SHA-256 salt to save passwords?

Not recommended. Password storage should use proprietary slow algorithms such as Argon2id, bcrypt, scrypt, or PBKDF2, with parameters configured according to current security guidelines.