What this hash generator does
A cryptographic hash function turns any input into a fixed-length fingerprint. Change a single bit and the fingerprint changes completely. This tool computes MD5, SHA-1, SHA-256, SHA-384, SHA-512 and SHA3-512 for text or files in one pass, can calculate HMACs with a secret key, and outputs hexadecimal or Base64. Hashing runs in a Web Worker and uses the browser's native Web Crypto implementation for the SHA-2 family, so even large files are processed quickly.
How to use it
- Type text into the input, or click Hash a file to select a file from your disk.
- All six digests appear on the right as you type.
- Enter an optional HMAC secret key to compute keyed hashes instead.
- Switch between Hex and Base64 output and toggle uppercase if needed.
- Copy any digest with its button.
Practical examples
- Verify a download: hash an ISO or installer and compare the SHA-256 with the checksum published on the vendor's website. If they match, the file is intact.
- Webhook signatures: services such as Stripe and GitHub sign payloads with HMAC-SHA256. Paste the raw body and your signing secret to reproduce the signature while debugging.
- Cache keys and ETags: hash a JSON payload to build a short, stable identifier for its contents.
- Subresource Integrity: a Base64 SHA-384 of a script is what goes into an
integrity="sha384-..."attribute.
Tips and edge cases
- MD5 and SHA-1 are broken for security purposes; collisions can be produced deliberately. Use them only for non-adversarial checksums.
- Plain hashes are not suitable for storing passwords. Use a slow, salted algorithm such as Argon2, scrypt or bcrypt.
- Text is hashed as UTF-8. A trailing newline or Windows line ending changes the result, so compare inputs carefully.
- Hex output is case-insensitive;
AB12andab12represent the same bytes. - For files, the whole file is read into memory, so multi-gigabyte files may be limited by available RAM.