Skip to content
Buy me a coffee
Encoders / Cryptography

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.

0 characters · 0 lines
Or upload a file to hash
Algorithms marked "(server)" are computed by api/hash.php in memory; everything else runs in your browser.
Ctrl + Enter

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

AlgorithmOutputYearStatusNotes
MD2128 bits1989brokenDesigned for 8-bit machines; collisions and pre-image attacks published. Historical only.
MD4128 bits1990brokenCollisions found in seconds. Still used inside NTLM password hashes, which is a problem in itself.
MD5128 bits1992brokenCollisions are trivial to generate (Flame malware forged a Microsoft certificate with one). Fine as a non-adversarial checksum, never for signatures or passwords.
SHA-1160 bits1995deprecatedPractical collision demonstrated in 2017 (SHAttered). Browsers reject SHA-1 certificates; Git is migrating to SHA-256.
SHA-224 / SHA-256224 / 256 bits2001secureSHA-2 family, 32-bit words. SHA-256 is the workhorse of TLS, Bitcoin, code signing and package managers.
SHA-384 / SHA-512 / SHA-512/256384 / 512 / 256 bits2001 / 2012secureSHA-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 / 512224–512 bits2015secureKeccak sponge construction, a completely different design from SHA-2 chosen by NIST as a backup. Immune to length-extension attacks.
RIPEMD-128 / 256128 / 256 bits1996weak128-bit variants are too short for collision resistance today; RIPEMD-256 is only as strong as RIPEMD-128.
RIPEMD-160 / 320160 / 320 bits1996acceptableNo practical attack known; RIPEMD-160 is used in Bitcoin addresses (after SHA-256). Prefer SHA-2 for new designs.
Whirlpool512 bits2000secureAES-like block cipher based hash, ISO/IEC 10118-3 standard. Used by TrueCrypt/VeraCrypt.
Tiger (192, 3 passes)192 bits1995acceptableDesigned for 64-bit CPUs; popular in P2P file sharing (TTH tree hashes).
GOST R 34.11-94256 bits1994weakFormer Russian standard, theoretically weakened; superseded by Streebog (GOST R 34.11-2012).
CRC-3232 bits1961checksumCyclic redundancy check used by ZIP, PNG and Ethernet to detect accidental corruption. Not cryptographic: trivially forgeable.
Adler-3232 bits1995checksumFaster 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's argon2-cffi, Node's bcrypt).

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.