MD5 and SHA hash generator
MD5, SHA-1, SHA-256 and SHA-512 hashes of any text, updated as you type. Paste a hash to check whether it matches.
- MD5
- SHA-1
- SHA-256
- SHA-384
- SHA-512
Text is hashed as UTF-8. Line endings and trailing spaces count.
How it works
Hash functions in practice
A cryptographic hash function turns any input into a short, fixed-size value. Change one letter and the result is completely different, which makes hashes ideal for spotting changes:
- Download checks: compare a file's SHA-256 (or, on older sites, MD5) with the one the publisher lists.
- Caching and deduplication: identical content gives an identical hash.
- Signatures and certificates: the data is hashed, then the hash is signed.
- Git identifies every commit and file by its hash.
Hash lengths
| Algorithm | Bits | Hex characters | Status |
|---|---|---|---|
| MD5 | 128 | 32 | Broken for security use; fine for checksums |
| SHA-1 | 160 | 40 | Broken for security use |
| SHA-256 | 256 | 64 | Recommended |
| SHA-384 | 384 | 96 | Secure |
| SHA-512 | 512 | 128 | Secure |
Two hashes that differ tell you the inputs differ, but not where. To see the exact lines or words that changed, compare the two texts in the diff checker.
Not sure whether you need a hash, encryption or just encoding? See hashing vs encryption vs encoding.
More tools
More on the bench
- JSON formatter and validatorPretty-print, minify and validate JSON, with the exact line of any error.
- Base64 encoder and decoderEncode text to Base64 and back, including URL-safe Base64 and emoji.
- URL encoder and decoderPercent-encode and decode URLs and query values, and break a URL into parts.
- Regex testerTest JavaScript regular expressions live, with groups, replace and common patterns.
- Text diff checkerCompare two texts or code snippets line by line or word by word.
- CSV to JSON and JSON to CSVConvert CSV to JSON and JSON to CSV, with delimiter detection.
- UUID (GUID) generatorGenerate random v4 or time-ordered v7 UUIDs, one or up to 1,000 at a time.
- JWT decoderRead the header and claims of a JSON Web Token, with expiry dates in plain English.
- Unix timestamp (epoch) converterEpoch seconds or milliseconds to a readable date and back in any time zone, ISO 8601 too.
- Lorem Ipsum generatorPlaceholder paragraphs, sentences or words, plain or as HTML.
Frequently asked questions
What is a hash?
A hash is a fixed-length fingerprint of data. The same input always gives the same hash, the smallest change gives a completely different one, and you can't work backwards from the hash to the input. Hashes are used to check file integrity, compare data and build digital signatures.
Which algorithm should I use?
SHA-256 is the standard choice for most purposes today. SHA-384 and SHA-512 are longer variants from the same SHA-2 family. MD5 and SHA-1 are broken for security uses and are here for checksums and compatibility with older systems.
Is MD5 safe?
For checksums, yes: MD5 still reliably shows whether a file or text has changed by accident, such as a broken download. For security, no: it is practical to create two different inputs with the same MD5 hash, so it must not be used for passwords, digital signatures or certificates. Use SHA-256 there, and a password hashing function for passwords.
Can I use SHA-256 to store passwords?
No. Plain SHA hashes are designed to be fast, which makes them fast to brute-force. Passwords should be stored with a slow, salted password hashing function such as Argon2, scrypt or bcrypt.
How do I check a hash?
Paste the text, then paste the hash you expect into "Compare with". The result says whether it matches one of the hashes, ignoring upper and lower case and spaces around it. A line from a checksum file, with the file name after the hash, works too.
Is my text sent anywhere?
No. Hashes are computed on your device: the SHA hashes by your browser's Web Crypto API, MD5 by a small script in this page. The text never leaves the page.