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" | sha256sumhasheshello\n, nothello. - Line endings: Windows
\r\nversus Unix\n, often changed by Git’score.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?
| Algorithm | Hex length | Use it for |
|---|---|---|
| SHA-256 | 64 | The default for integrity, signatures and HMAC |
| SHA-512 / SHA-384 | 128 / 96 | Same uses, larger output; often faster on 64-bit CPUs |
| SHA-1 | 40 | Git object IDs and legacy systems only |
| MD5 | 32 | Non-security checksums and cache keys |
| CRC32 | 8 | Detecting 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?
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.