FormatterHQ

Scrypt Hash Generator

Derive scrypt password hashes and encryption keys with your own cost N, block size r, parallelism p and salt, and copy the result as hex, Base64 or an encoded string.

Input TEXT
Output TEXT
Ready.

How to use the Scrypt Hash Generator

  1. Enter the password or passphrase to derive from.
  2. Set Cost N (power of 2), Block size r, Parallelism p and the Output length in bytes.
  3. Leave Salt blank for a random one, or enter a salt and choose whether it is Text, Hex or Base64 under Salt is.
  4. Click Derive key and copy the hex, Base64 or encoded form you need.

Scrypt hash generator with custom N, r and p

This scrypt hash generator runs the scrypt key derivation function on a password and returns the derived bytes in several encodings. Use it to check test vectors, debug a mismatch between two libraries, or derive a key with known parameters before writing code.

What is scrypt?

scrypt was designed by Colin Percival in 2009 and is standardized in RFC 7914. Like Argon2, it is memory-hard: computing one hash requires a large buffer of RAM, which makes massive parallel guessing on GPUs or ASICs expensive. It is used for password storage, disk and wallet encryption keys, and some proof-of-work schemes.

Example

Deriving 32 bytes from correct horse battery staple with N=16384, r=8, p=1 and the text salt NaCl gives:

Hex:     93d06c7dff9984858ff25694e9f7004c9e3ce466bfd263e24f7c1101a2d193ea
Base64:  k9Bsff+ZhIWP8laU6fcATJ485Ga/0mPiT3wRAaLRk+o=
Salt:    4e61436c (hex)

# Common encoded forms
$scrypt$ln=14,r=8,p=1$TmFDbA$k9Bsff+ZhIWP8laU6fcATJ485Ga/0mPiT3wRAaLRk+o
scrypt:16384:8:1$4e61436c$93d06c7dff9984858ff25694e9f7004c9e3ce466bfd263e24f7c1101a2d193ea

The $scrypt$ln=… line is the modular crypt format used by Python's passlib, where ln is log2 of N. The second line is a compact colon-separated form with hex salt and hash. The status bar also shows approximate memory use: 128 × r × N bytes, or about 16 MiB here.

Parameters explained

  • Cost N – the CPU and memory cost. It must be a power of two, such as 16384, 32768 or 65536. Doubling N doubles both time and RAM.
  • Block size r – scales the memory block size. 8 is the standard value almost everyone uses.
  • Parallelism p – runs independent mixes, multiplying CPU time without increasing peak memory.
  • Output length – 32 bytes suits an AES-256 key; 64 bytes is the default here.

The tool refuses settings needing more than 1 GiB so your browser tab stays responsive. If you pass a value that is not a power of two, you get a clear error instead of a silently wrong key.

scrypt vs Argon2 and PBKDF2

scrypt remains a solid choice and is built into Node.js and OpenSSL. For new password storage, the Argon2 hash generator shows the more modern alternative with separate memory and time knobs. If you need FIPS-approved derivation, use the PBKDF2 generator instead. Found an unfamiliar hash string? The hash identifier recognizes $scrypt$ prefixes.

Privacy

Derivation runs in your browser with WebAssembly, and random salts come from crypto.getRandomValues. Nothing you enter is uploaded.

Frequently asked questions

Why must N be a power of two?
The scrypt algorithm indexes its memory buffer with a value reduced modulo N, and the specification requires N to be a power of two greater than 1. Values such as 16384 (2^14) or 1048576 (2^20) are valid; 10000 is not.
What scrypt parameters are recommended?
A common baseline for interactive logins is N=2^15 or 2^16 with r=8 and p=1, which uses 32 to 64 MiB of memory. Tune N so one derivation takes an acceptable time on your server.
Why does my result differ from another library?
Check that the salt bytes are identical, including its encoding, and that N, r, p and the output length all match. A text salt and the same characters interpreted as hex produce completely different keys.
Can I use the output as an encryption key?
Yes. scrypt is a key derivation function, so the hex output can serve as a symmetric key, for example 32 bytes for AES-256. Store the salt and parameters alongside the ciphertext so you can derive the same key later.

Last updated October 3, 2026

Related tools

Self-Signed Certificate Generator Create a self-signed SSL/TLS certificate and RSA key for localhost, dev servers or internal tools. Generated locally with WebCrypto. SHA-1 Hash Generator Generate the SHA-1 hash of any text or file online. Instant 160-bit digest in hex, computed in your browser. SHA-2 Hash Generator Generate SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224 or SHA-512/256 hashes from text or files. SHA-224 Hash Generator Generate the SHA-224 hash of any text or file online. Instant 224-bit digest in hex, computed in your browser. SHA-256 Hash Generator Generate the SHA-256 hash of any text or file online. Instant 256-bit digest in hex, computed in your browser. SHA3-224 Hash Generator Generate the SHA3-224 hash of any text or file online. Instant 224-bit digest in hex, computed in your browser. SHA3-256 Hash Generator Generate the SHA3-256 hash of any text or file online. Instant 256-bit digest in hex, computed in your browser. SHA3-384 Hash Generator Generate the SHA3-384 hash of any text or file online. Instant 384-bit digest in hex, computed in your browser. SHA3-512 Hash Generator Generate the SHA3-512 hash of any text or file online. Instant 512-bit digest in hex, computed in your browser. SHA-384 Hash Generator Generate the SHA-384 hash of any text or file online. Instant 384-bit digest in hex, computed in your browser. SHA-512/224 Hash Generator Generate the SHA-512/224 hash of any text or file online. Instant 224-bit digest in hex, computed in your browser. SHA-512/256 Hash Generator Generate the SHA-512/256 hash of any text or file online. Instant 256-bit digest in hex, computed in your browser.