Hash generator
The digest appears here as you type
Hashed in your browser · the file is never uploaded
Hashing turns any input into a fixed-length fingerprint: 32 hexadecimal characters for MD5, 64 for SHA-256, 128 for SHA-512. The same input always gives the same digest, one changed character gives a completely unrelated one, and there is no way back. Useful for checking something has not changed, useless for hiding it.
How to generate a hash
Which one to use depends entirely on why. For anything security-related, SHA-256 or SHA-512. For verifying a download against a checksum published years ago, whichever the publisher used, which is often MD5 or SHA-1. Both are broken against a deliberate attacker but still perfectly good at catching a corrupted transfer. CRC-32 does not belong to that family at all; it is an error-detecting code, which is why ZIP files carry one.
MD5 has been broken since 2004, and it is worth being precise about what that means, because it is not useless. What is broken is collision resistance: an attacker can construct two inputs that hash the same. That defeats MD5 for signatures and for anything where a hostile party supplies the file, and does not defeat it for spotting a truncated download. Browsers dropped MD5 from WebCrypto precisely to stop people reaching for it by default, so the implementation here ships with the page while the SHA family comes from the browser itself.
The other recurring confusion is that SHA-256 is not encryption. Encryption is reversible with a key; hashing is not reversible at all, and a site offering to decrypt a digest is looking it up in a table of previously-hashed common inputs. That is also why a fast hash is the wrong tool for storing passwords: an attacker can try billions of candidates a second against a stolen database.
One thing that trips people up: this hashes the bytes of the text as UTF-8, so an accented character or an emoji contributes more than one byte and the digest reflects that.
What people use it for
- Generating a SHA-256 digest of a string
- Reproducing an MD5 that older documentation quotes
- Comparing digests to see whether two strings match exactly
- Seeing how the same text hashes under each algorithm
- Working out why a digest from another tool came out different
- Showing what one changed character does to a hash
Questions
SHA-256 unless something specific requires otherwise. It is fast, well-studied and has no known practical weaknesses.
No. Hashing throws information away by design. What attackers do instead is hash enormous lists of likely inputs and look for a match, which is why hashing a password without a salt is not enough.
No. Encryption is reversible with a key; hashing throws the information away for good. Anything offering to decrypt a digest is looking it up in a table of common inputs.
MD5 is 32 hexadecimal characters, SHA-1 is 40, SHA-256 is 64, SHA-384 is 96 and SHA-512 is 128. CRC-32 is 8. The length never changes with the size of the input.
Not against an attacker. Two different files with the same MD5 can be constructed in seconds. It is still fine for spotting accidental corruption.
Because it is fast and because checksums published years ago used it. Verifying a download against a publisher’s MD5 is still a reasonable corruption check.
No. Password storage needs a slow, salted function such as bcrypt, scrypt or Argon2. A fast hash is exactly the wrong tool.
No. There is no known practical attack on either its collision or preimage resistance.
Collisions have been demonstrated since 2017 and certificate authorities dropped it. Keep it for reading a legacy checksum, not for anything an attacker gets to influence.
No. SHA hashing uses the browser’s built-in WebCrypto and MD5 runs in code that shipped with this page. There is no request.
It was deliberately excluded so developers would not reach for it. This page implements it in JavaScript instead.
That is the avalanche property working as intended: any change to the input should produce an unrelated digest.
Almost always a trailing newline or a different text encoding. Check for a stray line break at the end of what you pasted.
Not a cryptographic one. It is an error-detecting code, which is what ZIP archives carry it for: good at catching corruption, no defence against anyone deliberately matching it.
No, this page hashes text. The checksum calculator reads a file from disk inside your browser and hashes it there, without uploading it.