Hash Generator
Hash text or a file with MD5, SHA-1, SHA-256 or SHA-512, and compare it with an expected checksum. Create and check bcrypt password hashes.
SHA-256 · no hash yet
The hash appears here.
Choose a file or drop one anywhere in this box. Files up to 256 MB are hashed in your browser and not uploaded.
01 · Definition
What is a hash?
A hash function turns any input, from one character to a multi-gigabyte file, into a fixed-length value called a digest. The same input always gives the same digest, a one-bit change gives a completely different one, and the input cannot be recovered from it. Hashes are used for checksums, signatures, deduplication and password storage.
02 · Overview
How the Hash Generator works
Type or paste text, or choose or drop a file of up to 256 MB, and get its MD5, SHA-1, SHA-256 or SHA-512 digest as lowercase hex. Paste the checksum a publisher lists to see whether it matches. bcrypt mode hashes a password at a cost factor from 4 to 14 and checks a password against an existing bcrypt hash. SHA digests use the Web Crypto API, MD5 uses spark-md5 and bcrypt uses bcryptjs. Text and files are hashed in your browser and are not uploaded to our server.
03 · Guide
MD5 vs SHA-1 vs SHA-256 vs SHA-512 vs bcrypt
MD5 and SHA-1 are fast but no longer collision-resistant: researchers have produced different inputs with the same digest for both. They remain fine for spotting accidental corruption and for matching a checksum a publisher already lists, and unsuitable for signatures or anything an attacker can influence.
SHA-256 and SHA-512 belong to the SHA-2 family specified in FIPS 180-4 and have no known practical collisions. Use SHA-256 unless something specifically asks for SHA-512.
bcrypt is a password hashing function, not a checksum. It is deliberately slow, salts every hash, and stores the cost and salt inside its 60-character output, so hashing the same password twice gives two different strings. It only reads the first 72 bytes of its input.
| Algorithm | Output | Collision-resistant | Use it for |
|---|---|---|---|
| MD5 | 128 bits, 32 hex characters | No | Matching legacy checksums, non-security fingerprints |
| SHA-1 | 160 bits, 40 hex characters | No | Matching legacy checksums, Git object IDs |
| SHA-256 | 256 bits, 64 hex characters | Yes | File checksums, signatures, content addressing |
| SHA-512 | 512 bits, 128 hex characters | Yes | As SHA-256 where a longer digest is required |
| bcrypt | 60 characters including cost and salt | Not applicable | Storing passwords |
04 · Use cases
When to use the Hash Generator
- 01
Verify a downloaded file against the SHA-256 checksum its publisher lists
- 02
Generate a bcrypt hash to seed a test user
- 03
Check whether a password matches a stored bcrypt hash
- 04
Get the MD5 or SHA-1 of a string for a cache key or ETag
05 · Examples
Hash Generator examples
hello world, SHA-256
ex 01b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9
The default input. The digest is 64 hex characters.
abc, SHA-256
ex 02ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
A standard SHA-256 test vector, useful for checking another implementation.
(empty input), SHA-256
ex 03e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
This digest is worth recognising: if you see it, you hashed nothing, usually an empty file or a missing variable.
abc, MD5
ex 04900150983cd24fb0d6963f7d28e17f72
An MD5 digest is 32 hex characters.
hunter2, bcrypt, cost 10
ex 05$2b$10$J0nuR.mo14fKACk7.hXodeeqGErEPrLqdbs7eJr1WCvA/Yi6rOAVS
One possible result. The salt is random, so each run gives a different hash that still verifies against hunter2.
06 · FAQ
Hash: frequently asked questions
How do I verify a downloaded file's checksum?
When should I use bcrypt instead of SHA-256?
Is MD5 broken?
Does my text or file leave the browser?
What is a salt, and does this tool add one?
What bcrypt cost factor should I use?
How do I check a password against a bcrypt hash?
Why is the hash of an empty input not empty?
07 · Guides
Hash guides
- MD5 vs SHA-1 vs SHA-256 vs SHA-512: Which Hash to Use→
MD5 and SHA-1 have known collisions; SHA-256 and SHA-512 are NIST-approved. Digest sizes, security strengths, and why none of them should store passwords.
08 · Reference
Specs and further reading
These are the primary sources this tool follows. Where a specification defines the behaviour, we link the specification, not a summary of it.
- FIPS 180-4: Secure Hash Standard (SHS)
NIST. The specification of SHA-1 and the SHA-2 family, including SHA-256 and SHA-512.
- SubtleCrypto.digest()
MDN Web Docs. The browser API that computes the SHA digests.
- Password Storage Cheat Sheet
OWASP. Recommends Argon2id, and for bcrypt a work factor of 10 or more with a 72-byte password limit.
09 · More
Tools that pair with Hash
Password Generator
Generate strong random passwords or passphrases from the EFF wordlist. Set the length and character types, see the entropy, and make up to 100 at once.
UUID Generator
Generate UUID v4, v7 or v1, one at a time or up to 1,000. Output as standard, uppercase, braces (GUID), no hyphens, URN or Base64, and decode any UUID you paste.
JWT Decoder & Encoder
Decode a JWT to read its header and claims, verify its signature with a secret or public key, and sign new tokens with HS, RS, PS and ES algorithms.
API Key Generator
Generate random API keys and secrets with an optional prefix such as sk_test_. Choose base64url, alphanumeric, base32 or hex, 8 to 96 characters, up to 100 keys.