Message Digester (MD5, SHA-256, SHA-512, …)
Compute a message digest (hash) from a string or file using MD2, MD4, MD5, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA-3, RIPEMD, Whirlpool, Tiger and GOST.
— the raw file bytes will be hashed instead of the text above.
api/hash.php in memory; everything else runs in your browser.Result
Message Digests Explained
What is a message digest?
A message digest — also called a hash, checksum or fingerprint — is a fixed-size value computed from an input of any length by a one-way function. MD5 always produces 128 bits (32 hex characters), SHA-256 always produces 256 bits (64 hex characters), whether you hash an empty string or a 4 GB disk image. A good cryptographic hash function has three properties:
- Pre-image resistance: given a digest, it is infeasible to find an input that produces it (one-way).
- Second pre-image resistance: given an input, it is infeasible to find a different input with the same digest.
- Collision resistance: it is infeasible to find any two inputs with the same digest.
Changing a single bit of the input changes roughly half of the bits of the digest (the avalanche effect), so digests are perfect for checking that data has not been altered. Because the function is deterministic, the same input always gives the same digest: SHA-256("abc") is ba7816bf…f20015ad on every computer in the world.
Supported algorithms
| Algorithm | Output | Year | Status | Notes |
|---|---|---|---|---|
| MD2 | 128 bits | 1989 | broken | Designed for 8-bit machines; collisions and pre-image attacks published. Historical only. |
| MD4 | 128 bits | 1990 | broken | Collisions found in seconds. Still used inside NTLM password hashes, which is a problem in itself. |
| MD5 | 128 bits | 1992 | broken | Collisions are trivial to generate (Flame malware forged a Microsoft certificate with one). Fine as a non-adversarial checksum, never for signatures or passwords. |
| SHA-1 | 160 bits | 1995 | deprecated | Practical collision demonstrated in 2017 (SHAttered). Browsers reject SHA-1 certificates; Git is migrating to SHA-256. |
| SHA-224 / SHA-256 | 224 / 256 bits | 2001 | secure | SHA-2 family, 32-bit words. SHA-256 is the workhorse of TLS, Bitcoin, code signing and package managers. |
| SHA-384 / SHA-512 / SHA-512/256 | 384 / 512 / 256 bits | 2001 / 2012 | secure | SHA-2 with 64-bit words: faster than SHA-256 on 64-bit CPUs. SHA-512/256 is SHA-512 truncated with different initial values. |
| SHA3-224 / 256 / 384 / 512 | 224–512 bits | 2015 | secure | Keccak sponge construction, a completely different design from SHA-2 chosen by NIST as a backup. Immune to length-extension attacks. |
| RIPEMD-128 / 256 | 128 / 256 bits | 1996 | weak | 128-bit variants are too short for collision resistance today; RIPEMD-256 is only as strong as RIPEMD-128. |
| RIPEMD-160 / 320 | 160 / 320 bits | 1996 | acceptable | No practical attack known; RIPEMD-160 is used in Bitcoin addresses (after SHA-256). Prefer SHA-2 for new designs. |
| Whirlpool | 512 bits | 2000 | secure | AES-like block cipher based hash, ISO/IEC 10118-3 standard. Used by TrueCrypt/VeraCrypt. |
| Tiger (192, 3 passes) | 192 bits | 1995 | acceptable | Designed for 64-bit CPUs; popular in P2P file sharing (TTH tree hashes). |
| GOST R 34.11-94 | 256 bits | 1994 | weak | Former Russian standard, theoretically weakened; superseded by Streebog (GOST R 34.11-2012). |
| CRC-32 | 32 bits | 1961 | checksum | Cyclic redundancy check used by ZIP, PNG and Ethernet to detect accidental corruption. Not cryptographic: trivially forgeable. |
| Adler-32 | 32 bits | 1995 | checksum | Faster than CRC-32 but weaker on short inputs; used by zlib. Not cryptographic. |
Typical uses
- Integrity verification: download sites publish the SHA-256 of an installer so you can check it was not corrupted or tampered with. Compute the digest of the downloaded file here and paste the published value in "Compare with".
- Digital signatures and certificates: a document is hashed and the (short) digest is signed instead of the whole document.
- Deduplication and caching: content-addressed storage (Git, Docker layers, IPFS, CDN cache keys) names a blob by its digest.
- Commitments and proofs: blockchains chain blocks by their hash; Merkle trees summarize large data sets.
- Passwords — with a caveat: a plain MD5 or SHA-256 of a password is not safe, because GPUs compute billions of them per second and rainbow tables exist. Use a slow, salted password hashing function instead: bcrypt, scrypt or Argon2id (PHP's
password_hash(), Python'sargon2-cffi, Node'sbcrypt).
Reading the output
Digests are bytes; they are usually displayed as hexadecimal (two characters per byte) but Base64 is common in HTTP headers (Digest, Content-MD5, Subresource Integrity sha384-…) and in JWTs. Both formats represent exactly the same bytes, and the comparison field accepts either, ignoring case and whitespace.
Privacy note: MD5, SHA-1 and the SHA-2 family are computed in your browser (pure JavaScript or WebCrypto). Algorithms marked "(server)" in the list — MD2, MD4, SHA-3, RIPEMD, Whirlpool, Tiger, GOST, CRC-32, Adler-32 — are not available in browsers and are computed by the small api/hash.php helper using PHP's hash() function. The data is processed in memory only and never stored or logged.