Scrypt Hash Generator

Generate and verify scrypt password hashes using configurable memory and CPU settings. All calculations run locally in your browser.

Calculations run locally in your browser. Avoid entering real production passwords into websites.

Estimated memory: 128.0 MiB (maximum 256 MiB).

A unique, randomly generated 16-byte salt is recommended for each password.

What is scrypt?

scrypt is a memory-hard password-based key derivation function developed by Colin Percival and specified in RFC 7914. It uses both processing time and substantial memory to make large-scale password guessing more expensive. It can be used for password storage and deriving cryptographic keys from passwords.

Scrypt parameters

  • N is the CPU and memory cost factor. It must be a power of two.
  • r controls the block size and memory consumption.
  • p controls the parallelization work factor.
  • Salt should be unique and randomly generated for each password.
  • Hash length sets the number of derived bytes; 32 bytes is a common choice.

Approximate working memory is 128 × N × r bytes. At N=2^17, r=8, and p=1, this is approximately 128 MiB. This browser tool limits that estimate to 256 MiB; actual memory use can be higher.

For password storage, OWASP's Password Storage Cheat Sheet lists N=2^17, r=8, p=1 as one scrypt configuration. Tune parameters to your server's performance and memory budget. Lower-cost options may be appropriate for constrained environments, but they provide less resistance per individual password guess.

How to use this tool

  1. Enter a password and choose the cost parameters.
  2. Keep the generated random salt or provide a valid hexadecimal salt.
  3. Select Calculate scrypt hash.
  4. Copy the PHC-style string or the raw hexadecimal derived key using its individual copy button.
  5. To verify a password, open Verify password, paste a compatible PHC-style string and enter the password to check.

Hash format and compatibility

The scrypt algorithm outputs derived bytes; it does not define a universal encoded password-hash string. This tool also produces a PHC-style string such as $scrypt$ln=17,r=8,p=1$<salt>$<hash>, using unpadded Base64 for the salt and hash. Other libraries may use different encodings or parameter names. Confirm compatibility before integrating this format into an application.

Security considerations

The calculation runs in a browser Web Worker using WebAssembly. Passwords are not intentionally transmitted to a server by this component, but you should still avoid entering production secrets into an untrusted website. Use a server-side password-hashing library for production authentication. For new password storage systems, Argon2id is generally preferred when available; scrypt is a strong alternative. Fast hash functions such as SHA-256 are not suitable for storing passwords on their own.

Frequently asked questions

Can a scrypt hash be decrypted?

No. Scrypt is a one-way key derivation function. An attacker can still test password guesses, so strong passwords and appropriately costly parameters remain important.

Why does the same password produce different hashes?

Different random salts produce different outputs. Verification uses the salt and parameters stored alongside the hash.

What does the N parameter change?

Increasing N raises memory requirements and computational work. A larger value can make hashing substantially slower or exceed a device's available memory.

Can I verify hashes generated by other libraries?

Only if they use the exact PHC-style format supported here, including the same scrypt parameters and Base64 encoding. Other formats require conversion or a compatible library.

Last updated:

© 2008–2026 XORBIN.COM. All rights reserved.