Generate and verify scrypt password hashes locally in your browser. Configure N, r, p and derived length, compare execution time, and export a hash or a complete parameter record.
Generate Scrypt Hash
Verify Scrypt Password Hash
Why Scrypt?
Scrypt is a password-based key derivation function whose memory cost increases the expense of parallel password guessing. It does not make weak passwords unguessable. RFC 7914 explains the design.
Choose scrypt when an existing system requires it or Argon2id is unavailable. For new password storage, OWASP prefers Argon2id; for FIPS requirements, consider PBKDF2-HMAC-SHA-256 in an appropriate validated implementation. OWASP selection guidance.
Budget for both login latency and concurrent requests. Raising N increases work and memory; r affects the block size, and p increases work. This browser library processes p lanes sequentially. Benchmark on deployment hardware under expected load, leaving room for allocation overhead and other requests. Browser timings describe this device, not your server's capacity. Scrypt parameter definitions.
Store a unique random salt, the parameters and the derived bytes together. When changing costs, verify with the old settings first, then generate a new record after successful authentication. See the OWASP work-factor upgrade guidance.
Scrypt parameter starting points
Reviewed . These selected OWASP scrypt configurations trade memory for additional work. Check the source when updating this table; they are starting points for benchmarking, not a universal latency or security guarantee.
Memory is approximately 128 × N × r bytes, with additional buffers required. Raising p does not guarantee faster execution or a proportional rise in peak memory. RFC 7914 algorithm and Node.js memory-limit guidance.
Scrypt FAQ
Is the salt text or hexadecimal bytes?
The salt field always encodes text as UTF-8. For example, 6162 becomes four bytes (0x36, 0x31, 0x36, 0x32), not the two hex-decoded bytes 0x61, 0x62. Generate salt produces random hex-looking text that is used literally. Output encoding changes only the hash representation. For interoperability, pass the same salt bytes to the other library; this field does not accept arbitrary binary salts. RFC 7914 defines the salt as an octet string.
Why do I get a memory-cost error or timeout?
The main memory estimate is 128 × N × r bytes: N=131072 and r=8 require about 128 MiB, plus implementation overhead. Browser allocation limits or this tool's two-minute timeout can stop a run. N must be a power of two greater than one, and implementation limits also apply. For new hashes, benchmark an appropriate configuration on the target system. To verify an existing hash, keep its original parameters and use a runtime with sufficient resources. In Node.js, check maxmem and allow overhead; its default is 32 MiB. Node.js scrypt options.
Which settings must match when verifying a hash?
Use the original password bytes, salt bytes, N, r, p and derived key length. Select the encoding of the expected hash: Hex, Base64 or comma-separated decimal bytes. A raw hash does not contain its salt or parameters. Save the complete JSON record at generation time; this tool accepts the raw hash and matching fields, not a pasted JSON record or another library's password-record string. Send to verify copies the current settings. RFC 7914 lists the derivation inputs.
How are Unicode passwords and salts handled?
This tool uses TextEncoder to encode passwords and salt text as UTF-8, including emoji, without Unicode normalization. Visually identical text can have different bytes: U+00E9 and U+0065 followed by U+0301 produce different hashes. Match the original text and normalization policy across systems; do not introduce normalization only during verification. Node.js documents the same Unicode interoperability issue.
❤️ Liked this tool?
If it saved you time, consider buying me a coffee to support future improvements.