Password and hash generator
Make a strong random password, or hash any text with SHA-256 and friends. Both use your browser's cryptographic functions, and nothing is sent anywhere.
runs in your browser · nothing uploaded
How to use it
- Set the length and the kinds of character you want. A new password appears straight away.
- Tick "no look-alikes" if someone will have to read or type it.
- Press New for another, then Copy.
- To hash text, type or paste it in the second box to see its SHA-1, SHA-256, SHA-384 and SHA-512 digests in hex.
How the passwords are made
Characters are picked with crypto.getRandomValues, the browser's cryptographically secure random source, using rejection sampling so that every character is equally likely. At least one character from each set you tick is included, then the order is shuffled.
Strength is measured in bits of entropy: length × log2(number of possible characters). A 20-character password from all four sets (89 possible characters) has about 129 bits.
Hashing is not password storage
SHA-256 is designed to be fast, which is exactly wrong for storing passwords: an attacker with a leaked database can try billions of guesses a second on a GPU. Store passwords with a slow, salted function built for it, such as Argon2id, scrypt or bcrypt. The guide on hashing passwords in Node.js below measures the difference.
SHA-1 is broken for collision resistance and should not be used for signatures. It is listed here because older systems, such as git object IDs, still use it.
Questions
Is what I paste sent to a server?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is uploaded, logged or stored by us, so it is safe to use with real data.
Why is there no MD5?
The browser's Web Crypto API does not provide MD5, because it is broken. If you need an MD5 checksum for an old system, use md5sum on Linux or Get-FileHash -Algorithm MD5 in PowerShell.
Does the same text always give the same hash?
Yes. A hash is deterministic: identical input, identical output. Change one character and the output changes completely.
How long should a password be?
If a password manager remembers it, use 20 characters or more. If you must type it, a long passphrase of several random words is easier and just as strong.