Scrypt is a memory-hard key derivation function designed to make password cracking extremely expensive. Unlike simple hash functions, scrypt requires significant amounts of RAM, making it resistant to GPU and ASIC-based attacks. Use this tool to generate secure password hashes directly in your browser. Experiment with different cost parameters (N, r, p) and see how they impact both security strength and computation time in real-time.
Configure scrypt parameters (N, r, p) to create a memory-hard, brute-force resistant password hash.
Check if a password matches an existing scrypt hash by regenerating with the same parameters.
Type or paste the password you want to hash into the input field. For the salt, you can either generate a cryptographically secure random value using the "Generate" button, or provide your own unique salt string.
Adjust the three core scrypt parameters based on your security requirements:
Click "Generate Hash" to compute your scrypt hash. The result appears in your chosen format (Hex or Base64). Important: Always store both the hash AND the salt together - you'll need both to verify passwords later.
To check if a password matches a stored hash, use the verification panel on the right. Enter the password, the original salt, and the expected hash. The tool will recompute the hash and tell you if they match.
The N parameter is your primary security dial. Here's a practical guide for 2024-2026:
A proper salt is critical for scrypt security:
Avoid these frequent errors when implementing scrypt:
Understanding these parameters is crucial for balancing security and performance. Here's what each one controls:
| Parameter | Description | Recommended Value | Security Impact |
|---|---|---|---|
N |
CPU/Memory cost factor — must be a power of 2 (210, 214, 220, etc.) | 16384 (214) minimum | ● Higher = exponentially more memory & time required |
r |
Block size — controls the sequential read size from memory | 8 (standard) | ● Higher = more memory bandwidth required (128 × N × r bytes) |
p |
Parallelization factor — number of independent mixing operations | 1 (or 2-4 for multi-core) | ● Higher = more CPU cores utilized, more total memory |
dkLen |
Derived key length — the size of your output hash in bytes | 32 bytes (256 bits) | ● Output size only — doesn't affect computation difficulty |
How does scrypt compare to other popular password hashing algorithms? Here's a comprehensive comparison:
| Algorithm | Memory-Hard | GPU Resistant | ASIC Resistant | Best Used For |
|---|---|---|---|---|
| 🛡 Scrypt | ✔ Yes | ✔ Good | ✔ Good | Password hashing, cryptocurrency mining, key derivation |
| 🏆 Argon2id | ✔ Yes | ✔ Excellent | ✔ Excellent | New applications, highest security requirements (PHC winner) |
| 🔒 bcrypt | ✘ No | ✔ Moderate | ⚠ Limited | Legacy systems, simple deployments, constrained environments |
| 📜 PBKDF2 | ✘ No | ✘ Weak | ✘ Weak | FIPS/NIST compliance, legacy compatibility only |
💡 Our Recommendation: Use Argon2id for new projects. Choose Scrypt when Argon2 isn't available or for cryptocurrency applications. Avoid PBKDF2 unless required for compliance.