UTILS.
100% in-browser
🧂

scrypt KDF Hash Generator & Verifier

Derive an scrypt key from a password with configurable N, r, p cost, or verify a password against a stored scrypt string. Runs fully in your browser.

Passwords are hashed 100% in your browser — nothing is uploaded.

— output appears here —

About this tool

The scrypt KDF Hash Generator & Verifier derives and checks scrypt outputs locally in your browser. scrypt, designed by Colin Percival and standardised in RFC 7914, is a memory-hard key derivation function: its cost is deliberately dominated by memory bandwidth so that custom cracking hardware gains little advantage. The pipeline is PBKDF2-HMAC-SHA256 to expand the password, the ROMix function built on BlockMix and the Salsa20/8 core to force large sequential memory use, and a final PBKDF2-HMAC-SHA256 to produce the derived key of your chosen length.

Generate mode reads 16 random salt bytes from crypto.getRandomValues and runs scrypt with three cost parameters: N is the CPU/memory cost and must be a power of two (default 16384 = 2^14), r is the block size (default 8), and p is the parallelisation factor (default 1). Memory usage is roughly 128 · N · r bytes — about 16 MiB at the defaults — and the tool warns when your settings would exceed 256 MiB. The output is a self-describing string $scrypt$ln=14,r=8,p=1$<base64 salt>$<base64 key> where ln = log2(N), so every parameter needed to verify is carried with the hash.

Verify mode parses ln, r, p, the salt, and the stored key out of that string, recomputes the derived key with the candidate password, and does a constant-time comparison to report match or no-match. The scrypt core runs as an eval-free WebAssembly build under the browser's strict security policy, so passwords are processed 100% in your browser and nothing is uploaded.

Frequently asked questions

Why must N be a power of two?
scrypt's ROMix step indexes a table of exactly N blocks and relies on N being a power of two for its integerify-and-mask addressing. The tool rejects non-power-of-two values. Typical choices are 16384 (2^14) for interactive use and 1048576 (2^20) for file encryption.
How much memory does scrypt use?
Roughly 128 · N · r bytes. At the defaults N=16384, r=8 that is about 16 MiB. Because the browser allocates this for real, large N or r values can be slow or fail on low-RAM devices — the tool warns above 256 MiB.
What do r and p control?
r is the block size, which scales both memory use and the amount of sequential work per block; increasing r raises memory cost alongside N. p is the parallelisation factor, running p independent scrypt computations, which raises CPU cost without raising the per-instance memory footprint.
What format is the generated hash?
A self-describing string $scrypt$ln=<log2 N>,r=<r>,p=<p>$<base64 salt>$<base64 key>. It embeds every parameter, so verify mode needs only that string and the password. All computation is local — nothing is uploaded.

More tools