Hash Generator

Hash text or files with 23 algorithms, from MD5 and SHA-256 to SHA-3, BLAKE3, Whirlpool, CRC32C and xxHash, and compare against an expected checksum.

The interactive tool loads here when JavaScript runs.

About this tool

What is the Hash Generator?

The Hash Generator computes a fixed-length fingerprint of text or a file with 23 algorithms: MD5, SHA-1, the SHA-2 family (SHA-224, SHA-256, SHA-384, SHA-512), SHA-3 in four sizes, Keccak-256, BLAKE2b, BLAKE2s, BLAKE3, RIPEMD-160, Whirlpool, SM3, MD4, and the non-cryptographic CRC32, CRC32C, Adler-32, xxHash64 and XXH3. Change a single character of the input and the digest becomes unrecognisable, which is what makes hashes useful for spotting differences and checking integrity.

Text is hashed as UTF-8, exactly as typed, including any trailing newline or spaces. Files are read in 4 MB slices, so multi-gigabyte downloads can be hashed without loading them into memory at once. Switch on "Compute all" to get every digest from a single read, and paste a published checksum into Expected hash to see which result, if any, matches.

For text, the SHA-2 hashes use the browser's Web Crypto API, MD5 and RIPEMD-160 use crypto-js, and the other algorithms and all file hashing use hash-wasm, a WebAssembly library whose output is checked against published test vectors. Output is lower-case hexadecimal, and nothing leaves the tab.

  • 23 algorithms: SHA-2, SHA-3, Keccak-256, BLAKE2/3, Whirlpool, SM3, RIPEMD-160, MD4/MD5, SHA-1, CRC32/CRC32C, Adler-32, xxHash
  • Text and file input; files are streamed in 4 MB slices
  • Every algorithm from one pass with Compute all
  • Expected-hash comparison with a clear match indicator
  • Runs locally; input is never uploaded
Read the guide: MD5, SHA-256, SHA-3, BLAKE3 and CRC32: Choosing the Right Hash

Updated

How to use the Hash Generator

  1. Choose a Hash Algorithm. SHA-256 is a good default; switch on Compute all to get every algorithm.
  2. On the Text tab type or paste your text, or on the File tab drop a file.
  3. Optionally paste the checksum you expect into Expected hash.
  4. Click Generate Hash, then copy a digest or read the match indicator.

Worked examples

The same word in four algorithms

Input

hello

Output

MD5 5d41402abc4b2a76b9719d911017c592; SHA-1 aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d; SHA-256 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824; CRC32 3610a686

Each algorithm has a fixed output length: 32, 40, 64 and 8 hex characters. Longer is not automatically better; what matters is whether the algorithm resists collisions.

One invisible newline

Input

"hello" followed by a newline (what echo hello | sha256sum hashes)

Output

5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03

A completely different SHA-256 from the one above. Use echo -n or printf in the shell when you want to match this page.

Background and insight

MD5 was published by Ron Rivest in 1992 and SHA-1 by the NSA and NIST in 1995. Both were the default for years and both are now broken for security purposes. Practical MD5 collisions were demonstrated in 2004, and in 2017 Google and CWI Amsterdam produced two different PDF files with the same SHA-1 hash, an attack they called SHAttered.

That does not make them useless. A collision attack needs an attacker who controls both inputs. For catching accidental corruption, deduplicating files or generating a cache key, MD5 is still fast and fine. For anything an adversary might try to forge, such as signatures or certificate fingerprints, use SHA-256 or stronger.

SHA-3 (FIPS 202, 2015) is not a replacement for a broken SHA-2 but a structurally different backup built on the Keccak sponge. Ethereum adopted Keccak before NIST changed its padding, so Ethereum's "Keccak-256" and SHA3-256 give different results for the same input. BLAKE2 (2012) and BLAKE3 (2020) grew out of the SHA-3 finalist BLAKE and are designed for speed in software. SM3 is China's national standard hash and Whirlpool is in ISO/IEC 10118-3. Tiger, Snefru, GOST R 34.11-94 and HAVAL are left out because no maintained browser implementation exists.

CRC32 is a different kind of tool altogether. It is a cyclic redundancy check designed to detect transmission errors, and it is what ZIP files, PNG chunks and Ethernet frames use; CRC32C is the variant in iSCSI, ext4 and SCTP, and xxHash and XXH3 are fast checksums for deduplication and caching. All of them are excellent at catching random bit flips and useless against deliberate tampering. General-purpose hashes like SHA-256 are also the wrong choice for storing passwords, because they are designed to be fast. Use bcrypt, scrypt or Argon2 for that.

Common use cases

  • Comparing values without exposing them

    Hash two strings, such as config values on two servers, and compare the hashes to see if they match.

  • Cache keys and ETags

    Derive a short, stable key from a long request body or file content.

  • Checking test vectors

    Confirm your own hashing code produces the same output as a known implementation for a given input.

  • Learning how hashes behave

    Change one character and watch the avalanche effect change the whole digest.

  • Verifying a download

    Drop an ISO or installer, paste the vendor's SHA-256 or BLAKE3 sum and check it matches before running it.

Tips and limitations

  • Hashes are case-insensitive hex. Compare them after lower-casing both, or you will see false mismatches.
  • Line endings change the hash. Text copied from a Windows file may contain \r\n where you typed \n.
  • Hashing a short secret such as a 4-digit PIN does not hide it: all 10,000 hashes can be computed in milliseconds.
  • For message authentication (webhooks, API signatures) use HMAC with a secret key, not a plain hash of the message.
  • Base64-encoded digests (common in HTTP headers and SRI) are the same bytes as the hex shown here, just written differently.
  • xxHash64 and XXH3 are computed with seed 0 and shown in the canonical big-endian hex form that xxhsum prints.
  • Ethereum addresses and function selectors use Keccak-256, not SHA3-256. Pick the Keccak option for those.

Sources and further reading

Frequently asked questions

Which hash algorithm should I use?

SHA-256 for anything security-related, such as integrity checks an attacker might target, signatures or fingerprints. MD5 or CRC32 are acceptable for non-adversarial uses like detecting accidental changes, deduplication or cache keys. For passwords, use bcrypt, scrypt or Argon2 instead of any of these.

Can a hash be reversed to get the original text?

Not mathematically, because a hash throws information away. But short or common inputs can be found with lookup tables or brute force, since attackers can hash billions of guesses per second. That is why passwords need a slow, salted algorithm rather than a plain fast hash.

Why does my hash differ from another tool's output?

Usually the input differs invisibly: a trailing newline, a different line ending (CRLF versus LF), a byte order mark, or a different text encoding. Hash functions see bytes, not characters. This page hashes the UTF-8 bytes of exactly what is in the box.

Is MD5 still safe to use?

Not for signatures, certificates or anything an attacker could try to forge, because MD5 collisions can be produced on a laptop in seconds. It is still fine as a fast checksum for catching accidental corruption, or for non-security keys where nobody benefits from creating a collision.

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

Only the padding byte. NIST changed it when standardising SHA-3 in FIPS 202, after Ethereum had already adopted the original Keccak. The internal permutation is identical, but the same input gives completely different digests, so pick the variant your system expects.

Which is faster, BLAKE3 or SHA-256?

In software BLAKE3 is several times faster than SHA-256 and can use many cores, though CPUs with SHA extensions narrow the gap. Both are secure. Use SHA-256 when you must interoperate with existing checksums, and BLAKE3 when you control both ends and speed matters.

Should I hash passwords with SHA-256?

No. SHA-256 is designed to be fast, so a GPU can test billions of guesses per second against a leaked table. Use a password hashing function such as Argon2id, scrypt or bcrypt, which are deliberately slow, salted and tunable as hardware improves.

Is there an in-depth guide to the Hash Generator?

Yes. “MD5, SHA-256, SHA-3, BLAKE3 and CRC32: Choosing the Right Hash” covers the background, how it works, common pitfalls and worked examples. Read the full guide.