About the Hash Generator (MD5, SHA)
Generate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text at once. Type or paste a string and all five digests appear as you type, in lowercase hex, ready to copy. Use it to check text against a published checksum or to test code that hashes strings. It also lets you compare two values without showing either of them.
Hashing happens in your browser, so the text isn't sent anywhere. Only typed or pasted text is hashed, not files; for a downloaded file, use a command such as sha256sum or certutil on your own computer.
How the hashes are calculated
Your text is first turned into bytes with UTF-8, the encoding used by almost every website and programming language. Plain English letters take one byte each, accented letters such as é take two, and most emoji take four. The hash is worked out from those bytes, which is why the same word stored in another encoding produces a different digest.
SHA-1, SHA-256, SHA-384 and SHA-512 come from the browser's built-in SubtleCrypto.digest function, which follows the NIST standard FIPS 180-4. Web Crypto has no MD5, so MD5 is computed by a small JavaScript implementation of RFC 1321 that uses the RFC's own table of constants. Each digest is written in hexadecimal, two characters per byte.
Whatever goes in, the hash comes out the same length: a single letter and a whole chapter both give 64 characters of SHA-256. Change one character, even just its capitalisation, and the entire digest changes. Two values match only when the input bytes are identical.
Assumptions and limits
- Whitespace counts. A trailing space or a line break at the end produces a completely different hash, so trim pasted text when you're matching a value made elsewhere.
- Line breaks typed in the box are stored as a single line-feed character (LF). Text hashed with Windows CRLF line endings won't match.
- MD5 and SHA-1 have practical collision attacks. Use them only for non-security checksums or to match an older system; use SHA-256 or longer where tampering matters.
- These are plain hashes, not keyed HMACs or password hashes. Passwords should be stored with a slow, salted algorithm such as Argon2, bcrypt or scrypt.
Worked examples
SHA-256 of 'abc', the standard test value
FIPS 180-4 uses abc as its first worked example. Type abc and the SHA-256 line shows exactly the published answer, a quick way to confirm the generator matches the standard.
abc → SHA-256 ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad abc → MD5 900150983cd24fb0d6963f7d28e17f72
Why the terminal gives a different SHA-256 hash
echo hello | sha256sum adds a line break after the word, so the terminal hashes six bytes, not five. Use echo -n or printf to match what you typed here.
hello → 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 hello + line break → 5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03
The MD5 hash of an empty string
Clear the box and every algorithm still returns a value. The MD5 of nothing is d41d8cd98f00b204e9800998ecf8427e and the SHA-256 is e3b0c442…b855. If either shows up in a database or log, something hashed an empty field.
Hash algorithms at a glance
| Algorithm | Digest size | Hex characters | Typical use |
|---|---|---|---|
| MD5 | 128 bits | 32 | Accidental-corruption checks and cache keys; broken for security |
| SHA-1 | 160 bits | 40 | Older systems and Git object IDs; broken for security |
| SHA-256 | 256 bits | 64 | Download checksums, certificates, code signing |
| SHA-384 | 384 bits | 96 | TLS cipher suites, Subresource Integrity in HTML |
| SHA-512 | 512 bits | 128 | Where a longer digest is wanted |
How to use the Hash Generator (MD5, SHA)
- Type or paste the text. The box starts with sample text; replace it with your own. Every character, including spaces and line breaks, is hashed.
- Read the five digests. MD5, SHA-1, SHA-256, SHA-384 and SHA-512 update as you type, each labelled with its size in bits.
- Copy the one you need. Press Copy next to an algorithm and paste the lowercase hex where you need it.
Frequently asked questions
How do I generate a SHA-256 hash online?
Type or paste the text into the box, then press Copy next to the SHA-256 line, which fills in straight away with a 64-character hex string. The value matches sha256sum, OpenSSL or Python's hashlib as long as they hash exactly the same UTF-8 bytes.
Can an MD5 or SHA-256 hash be decrypted?
No. A hash is a one-way fingerprint, not encryption, so there is no key that turns it back into text. Sites that claim to 'decrypt' MD5 look the hash up in huge tables of words that were hashed in advance, which is why short or common inputs are easy to recover and long random ones aren't.
Why doesn't my hash match the one from another tool?
Almost always because the input bytes differ: a hidden trailing space or newline, Windows line endings, different capitalisation, or text saved in another encoding such as UTF-16. The algorithms themselves are standardised, so identical bytes always give identical digests.
Is MD5 still safe to use?
Not for security. Researchers can create two different inputs with the same MD5, and the same is now practical for SHA-1. MD5 is still fine for spotting accidental corruption or as a cache key, but signatures and integrity checks against attackers need SHA-256 or stronger.
Should I hash passwords with SHA-256?
No. SHA-256 is designed to be fast, so a stolen list of SHA-256 password hashes can be attacked at billions of guesses per second on ordinary graphics cards. Password storage needs a deliberately slow, salted algorithm such as Argon2, bcrypt or scrypt.
Is the text I type sent anywhere?
No. The hashes are worked out by your own browser and nothing you type leaves the page or is saved. Test values and internal identifiers are safe to hash here. For real secrets, a command-line tool on your own machine is the more cautious choice.
This tool runs entirely in your browser. What you enter or upload stays on your device and is never sent to our servers.