Cryptographic Salt Generator

Generate cryptographically secure random salts for password hashing and encryption

Click Generate to create a salt

Salt Configuration

32 bytes (64 hex chars)
816324864

Bulk Generation

Salt Best Practices

Use Unique Salts

Generate a new unique salt for each password. Never reuse salts across different users or passwords.

Minimum 16 Bytes

Use at least 16 bytes (128 bits) of salt. 32 bytes is recommended for high-security applications.

Cryptographic Random

Always use a cryptographically secure random number generator. This tool uses the Web Crypto API.

Store with Hash

Store the salt alongside the password hash. The salt is not secret - its purpose is to ensure uniqueness.

Usage Examples

JavaScript
// Generate salt using Web Crypto API
const salt = crypto.getRandomValues(new Uint8Array(32));
const saltHex = Array.from(salt)
  .map(b => b.toString(16).padStart(2, '0'))
  .join('');

// Hash password with salt (using SubtleCrypto)
const encoder = new TextEncoder();
const data = encoder.encode(password + saltHex);
const hashBuffer = await crypto.subtle.digest('SHA-256', data);