Hash Generator
Hash text or a file with MD5 and the SHA family at once, sign with HMAC, get a Subresource Integrity value, and check a download against its published checksum.
Last checked
Files never leave your device. Everything runs in this tab.
Text to hash
Hashes
Hashes appear here as you type.
Compare with a published hash
How to use it
- Pick Text or File. Type or paste text, or choose a file; the hashes appear at once.
- Choose hex or Base64 output, and tick HMAC if you need a keyed signature, for example to check a webhook.
- To verify a download, paste the checksum, or the whole SHA256SUMS file, under Compare. The line for your file name is used and the matching row turns green.
What it checks and why
A hash function turns any input into a short fixed-size value. The same bytes always give the same hash, and changing a single bit changes about half of the output, so a hash works as a fingerprint for a file or a message. SHA-256 gives 256 bits, written as 64 hex characters.
SHA-1, SHA-256, SHA-384 and SHA-512 come from the browser's Web Crypto API (crypto.subtle.digest). Web Crypto has no MD5, SHA-224, SHA-3 or CRC32, so those are computed by small implementations in the page, checked against the published test vectors. MD5 and CRC32 are still common for file checksums and cache keys; CRC32 only detects accidental changes and is not a cryptographic hash.
SHA-3 (FIPS 202) is a different design from SHA-2, not a longer version of it. Ethereum's keccak256 is the original Keccak submission, which pads the input differently, so it gives a different result from SHA3-256 for the same bytes.
MD5 and SHA-1 are broken for collisions: people can build two different files with the same hash on purpose. They still detect accidental damage, such as a broken download, but do not use them for signatures, certificates or passwords. For anything security related use SHA-256 or longer.
HMAC mixes a secret key into the hash (RFC 2104). Services such as GitHub and Stripe sign webhook bodies with HMAC-SHA256, and you can recompute the signature here to debug a mismatch. A frequent cause is the body itself: a different line ending, a trailing newline or re-serialised JSON gives different bytes and a different hash.
Subresource Integrity lets a page refuse a script or stylesheet from a CDN when its contents change. The integrity attribute holds the algorithm and the Base64 digest, for example sha384- followed by 64 characters. Choose the file and copy the value.
Specs and sources
Limits
- Do not store passwords as a plain hash from this or any tool. Passwords need a slow salted function such as Argon2, scrypt or bcrypt.
- A whole file is read into memory before hashing, so files are limited to 1 GB and big ones may be slow or fail on a phone.
- Text is hashed as UTF-8. A file saved as UTF-16 or with a byte order mark has different bytes and so a different hash; hash the file itself instead.
- BLAKE2, BLAKE3, RIPEMD-160 and SHA-512/256 are not offered.
- A matching checksum only proves the file is the one the page lists. If the page itself was tampered with, check a signature from the publisher too.
Questions
- How do I verify a SHA256SUMS file?
- Pick File, choose the download, and paste the whole SHA256SUMS file under Compare. The line whose file name matches yours is used. With several files chosen, each row shows Match or Differs. The command line equivalent is sha256sum -c SHA256SUMS.
- Why does my HMAC not match the webhook signature?
- Check the key encoding first: many services give the secret as hex or Base64, and it must be decoded to bytes, not used as text. Then check that you hash the raw request body byte for byte, and compare in the same encoding (hex or Base64).
- How do I check the SHA-256 of a downloaded file?
- Pick File, choose the download, and paste the checksum from the vendor's page into Compare. The tool says which hash matches. On the command line the same check is sha256sum on Linux, shasum -a 256 on macOS or certutil -hashfile file SHA256 on Windows.
- Why is my hash different from the one I expected?
- Usually the input bytes differ: CRLF instead of LF line endings, a trailing newline, a different text encoding, or extra spaces. Try the CRLF option, or hash the original file instead of pasted text.
- Is MD5 still safe to use?
- Not for security. Collisions can be made on purpose, so MD5 must not be used for signatures or passwords. It is still fine to spot accidental corruption.
- What is the difference between a hash and HMAC?
- Anyone can compute a plain hash. HMAC also needs a secret key, so only someone with the key can produce or check the value. Webhook signatures use HMAC for that reason.
- Can a hash be reversed?
- No, a hash cannot be turned back into its input. Short or common inputs can still be found by guessing, which is why passwords need salted slow hashing.
- Are my files uploaded?
- No. Files never leave your device. The browser reads them and computes the hashes locally.