Hash generator

Hash text or files with SHA-256, SHA-512, SHA-384, SHA-1, MD5 and CRC32, with optional HMAC. Paste an expected hash to check it, and if it doesn’t match, find out why.

Text
Hashes
Type some text to hash it

Debugging a hash that doesn’t match

Two hashes only match if the input bytes are identical. Text that looks the same often isn’t. Paste the hash you expected into the compare box and the tool checks:

  • Exact match against every algorithm, so you find out which one was used.
  • A trailing newline, added or missing. echo "hello" | sha256sum hashes hello\n, not hello.
  • Line endings: Windows \r\n versus Unix \n, often changed by Git’s core.autocrlf.
  • A byte order mark at the start, added by some Windows editors.
  • Leading or trailing spaces, and letter case.
  • Bad expected hashes: a length no algorithm produces (usually cut off when copying), or a character that isn’t hex.

When a variant matches, the difference is marked in your input and you can apply it in one click. If nothing matches, the two hashes are shown side by side from the first character that differs.

The input stats under the text box show the byte count, line ending style, whether there’s a final newline, and whether there’s a BOM, which are the usual suspects.

Which algorithm?

AlgorithmHex lengthUse it for
SHA-25664The default for integrity, signatures and HMAC
SHA-512 / SHA-384128 / 96Same uses, larger output; often faster on 64-bit CPUs
SHA-140Git object IDs and legacy systems only
MD532Non-security checksums and cache keys
CRC328Detecting accidental corruption (ZIP, PNG, Ethernet)

None of these are suitable for storing passwords. Use Argon2id, bcrypt or scrypt.

The same hashes on the command line

# macOS / Linux
printf 'hello' | shasum -a 256       # no trailing newline
sha256sum file.zip                   # Linux
shasum -a 256 file.zip               # macOS
openssl dgst -sha256 -hmac 'key' file.json

# Windows PowerShell
Get-FileHash file.zip -Algorithm SHA256

// Node.js
crypto.createHash('sha256').update('hello').digest('hex')

Verifying a webhook signature

Most webhook providers send an HMAC-SHA256 of the raw request body, using your signing secret as the key. Turn on HMAC, enter the secret, paste the exact raw body and compare with the signature header. If it doesn’t match, the usual cause is hashing parsed-and-re-serialised JSON instead of the raw bytes. Spot the difference with the text diff checker, or decode a Base64 signature with the Base64 tool.

Questions people ask

Why doesn’t my hash match?
Almost always because the input bytes differ in a way you can’t see: a trailing newline (from echo without -n), Windows line endings, a byte order mark, or spaces copied by accident. Paste the expected hash and the tool tries each of these and tells you which one matches.
Is MD5 or SHA-1 safe to use?
Not for security. Both are broken: attackers can create two different inputs with the same hash. They’re still fine for checksums against accidental corruption and for cache keys. For anything security-related, use SHA-256 or better.
Can a hash be reversed?
No. A hash is one-way. But short or common inputs, like passwords, can be found by guessing: attackers hash billions of candidates and compare. That’s why passwords need a slow, salted algorithm like Argon2, bcrypt or scrypt, not a plain hash.
What is HMAC?
A hash mixed with a secret key. Only someone with the key can produce the same HMAC, so it proves a message hasn’t been changed and came from someone who knows the key. Webhooks from Stripe, GitHub and others are signed with HMAC-SHA256.
Are my files uploaded?
No. Hashing runs in your browser with the Web Crypto API (and a small built-in MD5 and CRC32). Files are read locally and never leave your device.
↑↓ move↵ openesc close