All Tools

Hash Calculator: SHA-3, BLAKE2, KMAC, Keccak Online

Compute one of 32 hashes of text or a file in your browser: SHA-3, Keccak-256, SHAKE, cSHAKE, KMAC, BLAKE2, BLAKE3, RIPEMD, SHA-2, MD2, MD4 and MD5. Keys, customisation strings, variable output length, hex or Base64, compare field. Nothing is uploaded.

This is the digest of the empty input.

SHA3-256

a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a

About the Hash Calculator

The Hash Calculator computes one cryptographic digest at a time, chosen from 32 algorithms: MD2, MD4, MD5, SHA-1, the SHA-2 family including SHA-512/224 and SHA-512/256, double SHA-256, SHA-3, the original Keccak, SHAKE128 and SHAKE256, cSHAKE128 and cSHAKE256, KMAC128 and KMAC256, RIPEMD-128, RIPEMD-160, RIPEMD-256 and RIPEMD-320, BLAKE2b, BLAKE2s and BLAKE3. Type or paste text, or choose a file of up to 50 MB, pick an algorithm and the digest updates as you go. The page opens on SHA3-256. If you want the six common digests side by side instead, the Hash Generator shows MD5, SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 at once. Everything runs in your browser; your text and files are never uploaded.

How to use it

Steps

  1. Type or paste text, or press Choose file and pick a file. The digest of the empty input is shown until you do.
  2. Pick an algorithm from the Algorithm list. The algorithms are grouped by family.
  3. For SHAKE, cSHAKE, KMAC and BLAKE3, set Output length (bits) to any multiple of 8 from 8 to 4096. BLAKE2b goes up to 512 bits and BLAKE2s up to 256.
  4. For BLAKE2 and KMAC, enter a Key and pick its Key format, hex or UTF-8 text. For cSHAKE and KMAC, a Customisation string, and for cSHAKE a Function name, are hashed as UTF-8. These fields only appear when the algorithm uses them.
  5. Turn on Upper case for capital hex letters, or Base64 to show the digest in Base64. Press Copy to copy it.
  6. To check a value, paste it into Compare with. The page reads Matches or No match, ignoring case and spaces, in hex or Base64.

Privacy

Every algorithm runs as code on this page, in your browser. Your text and files are never uploaded to our servers, and nothing is kept once you close or reload the tab.

Choosing an algorithm

Modern choices

SHA-256 and SHA-512 remain the everyday standard. SHA-3 (FIPS 202) is the newer NIST family built on a different design, useful when a specification asks for it or as a hedge against SHA-2. BLAKE3 is very fast and has a variable output length. SHA-512/224 and SHA-512/256 are SHA-512 with different starting values, cut short; they are often faster than SHA-256 on 64-bit processors.

Keyed hashes and customisation

  • BLAKE2b: 512 bits by default, 8 to 512 bits, optional key of up to 64 bytes.
  • BLAKE2s: 256 bits by default, 8 to 256 bits, optional key of up to 32 bytes.
  • cSHAKE128 and cSHAKE256: 256 and 512 bits by default, 8 to 4096 bits, function name and customisation strings, no key.
  • KMAC128 and KMAC256: 256 and 512 bits by default, 8 to 4096 bits, a required key of any length and a customisation string.

BLAKE2 (RFC 7693) is the fast predecessor of BLAKE3 and is widely deployed, for example inside Argon2 and libsodium. With a key it becomes a message authentication code in one pass, without the double hashing HMAC needs. BLAKE2b suits 64-bit processors and BLAKE2s small and 32-bit ones. Unlike SHAKE, a shorter BLAKE2 output is not a prefix of a longer one, because the length is part of the setup.

cSHAKE and KMAC come from NIST SP 800-185 and are built on the SHA-3 permutation. cSHAKE is SHAKE with two domain-separation strings: the function name, reserved for NIST-defined functions and normally left empty, and a customisation string of your choosing, so that two uses of the same input give unrelated outputs. With both empty, cSHAKE equals SHAKE. KMAC is the SHA-3 message authentication code: it needs a key, takes an optional customisation string, and the requested length changes the whole tag rather than cutting it short.

Keccak versus SHA-3

Ethereum and Solidity use Keccak-256 with the padding of the original Keccak submission. NIST changed that padding when it published SHA-3, so Keccak-256 and SHA3-256 give different digests. Go to the Keccak-256 hash page for Ethereum work and the SHA3-256 hash page for standard SHA-3.

Blockchain hashes

Bitcoin uses double SHA-256, SHA-256 of the SHA-256 digest bytes, for block and transaction ids, and RIPEMD-160 of SHA-256 for addresses. The RIPEMD-160 hash page covers the RIPEMD family.

Legacy and broken

MD2, MD4, MD5 and SHA-1 are broken: collisions can be produced on purpose, MD4 ones by hand. They are here because old formats still use them, NTLM hashes for MD4 and old certificates for MD2. Use them to read or match existing data, never for new security work. RIPEMD-128 offers only 64-bit collision resistance, and RIPEMD-256 and RIPEMD-320 are no stronger than RIPEMD-128 and RIPEMD-160; they only give longer outputs.

Reading the output

  • Hex is the default, two characters per byte, so a 256-bit digest is 64 characters.
  • Text is hashed as UTF-8 without a trailing newline. A terminal echo adds one, so use printf to match.
  • None of these is a password hash. Use a slow, salted function such as Argon2 or bcrypt for passwords, and the Password Generator for strong secrets.

Related tools

Inspect the bytes you are hashing with Text to Hex, or encode a digest with the Base64 Encoder. The BLAKE3 hash page explains the extendable output.

Open-source credits

  • MD5, SHA-1, SHA-2, SHA-3, Keccak, SHAKE, cSHAKE, KMAC, RIPEMD-160, BLAKE2 and BLAKE3: @noble/hashes by Paul Miller, MIT licence.
  • BLAKE2b and BLAKE2s follow RFC 7693 by Markku-Juhani O. Saarinen and Jean-Philippe Aumasson, and are checked against its Appendix A and B examples.
  • cSHAKE128, cSHAKE256, KMAC128 and KMAC256 follow NIST SP 800-185, and are checked against the NIST cSHAKE and KMAC example values.
  • MD2 follows RFC 1319 and MD4 follows RFC 1320, both by Ronald Rivest.
  • RIPEMD-128, RIPEMD-256 and RIPEMD-320 follow Dobbertin, Bosselaers and Preneel, "RIPEMD-160: A Strengthened Version of RIPEMD" (1996), and are checked against the vectors on Antoon Bosselaers' RIPEMD page.

Frequently asked questions

What is the difference between SHA3-256 and Keccak-256?

Both use the same Keccak permutation, but NIST changed the padding byte when it standardised SHA-3 in FIPS 202. Ethereum adopted Keccak before that change, so its keccak256 is the original Keccak-256 and gives a different digest from SHA3-256 for the same input. Pick the one the system you are matching uses.

Why can I choose the output length for SHAKE, BLAKE2 and BLAKE3?

SHAKE, cSHAKE and BLAKE3 are extendable-output functions: they can produce as many bytes as you ask for, and a shorter output is a prefix of a longer one. This page accepts any multiple of 8 from 8 to 4096 bits. BLAKE2 and KMAC also take a length, but it changes the whole output rather than cutting it short, and BLAKE2b stops at 512 bits and BLAKE2s at 256. The defaults are 256 bits for the 128-bit variants, BLAKE3 and BLAKE2s, and 512 bits for the others.

What does the key do in BLAKE2 and KMAC?

With a key, BLAKE2 and KMAC become message authentication codes: only someone who knows the key can produce or check the tag, so it proves both integrity and origin. Unlike HMAC, which wraps a plain hash in two passes, both take the key directly. The key is optional for BLAKE2 (up to 64 bytes for BLAKE2b, 32 for BLAKE2s) and required for KMAC. Enter it as hex or as UTF-8 text.

What are the customisation string and function name in cSHAKE and KMAC?

They are domain-separation inputs defined in NIST SP 800-185. A different customisation string gives an unrelated output for the same message and key, so one key or input can safely serve several purposes. The function name is reserved for functions NIST defines, such as KMAC itself, and is normally left empty. With both strings empty, cSHAKE gives the same output as SHAKE. Both are hashed as UTF-8 text.

Are MD2, MD4 and MD5 safe to use?

No, not for security. Collisions have been found for all three, and MD4 collisions can be computed by hand. They are offered because legacy formats still contain them, such as NTLM password hashes (MD4) and old certificates (MD2). For new work use SHA-256, SHA-3 or BLAKE3.

What is double SHA-256?

It is SHA-256 applied to the 32 raw bytes of a SHA-256 digest, not to its hex text. Bitcoin uses it for block hashes, transaction ids and address checksums. Note that block explorers usually display block and transaction hashes with the bytes reversed.

Is my text or file uploaded to compute the hash?

No. Every algorithm runs as code on the page, in your browser. The file is read locally, its bytes are hashed there, and nothing is sent anywhere or kept after you close the tab.

Other related tools