Hash Generator
Hash text or a file with SHA-256, SHA-3, MD5, BLAKE3 and more, make an HMAC with a key, and check a published checksum.
Hash results
| Algorithm | Hash | |
|---|---|---|
| Type or paste text, or open a file, to see its hashes. | ||
Computes SHA-256, SHA-512, SHA-384, SHA-224, SHA3-256, SHA3-512, SHA3-384, SHA3-224, Keccak-256, BLAKE3, SHA-1 and MD5 hashes and a CRC32 checksum of any text or file, all at once, or with a secret key the HMAC of each of SHA-256, SHA-512, SHA-384, SHA-224, SHA-1 and MD5, and checks them against a published value. Hashing runs in your browser; text, files and keys are not sent anywhere.
How to use it
Type or paste text; every hash updates immediately, with a copy button on each row. The byte count below the input is the size of the text in UTF-8, which is what gets hashed.
Or open or drop a file, of any size: it is read a piece at a time, never held whole in memory, with a progress bar and Stop. Each algorithm runs alongside the others, so the wait is that of the slowest.
To check a download, paste its published hash into Expected hash: a bare hash, a line of sha256sum or openssl output, a whole SHA256SUMS file, certutil or PowerShell output, or an SRI value such as sha384-…. The tool says which algorithm matches and marks its row, or, when none does, which algorithm the pasted hash's length belongs to. A match on CRC32, MD5 or SHA-1 rules out accidental damage, but those cannot prove a file is the original.
HMAC mode adds a Secret key and computes the HMAC of each of SHA-256, SHA-512, SHA-384, SHA-224, SHA-1 and MD5 instead. Key is says how the key is written: Text is used as its UTF-8 bytes; Hex takes two digits per byte, spaces allowed between them, and refuses an odd count or a stray character; Base64 takes the standard or the URL-safe alphabet, with or without padding, and refuses anything malformed. An empty key is valid HMAC and is computed, with a note saying so. The key is not stored, and a new visit starts in Hash mode. The expected value can be pasted in hex or Base64, as webhook signature headers carry it.
Output writes each result as lowercase or uppercase hex, Base64, or Base64url without padding, as JWTs and URLs carry it. The bytes are the same in every form.
Typed or pasted text is hashed with LF line breaks, the Unix line ending, because browsers turn Windows line endings (CRLF) in a text field into LF. A file is hashed byte for byte, so to match a published checksum, open the file itself rather than pasting its text.
What a hash is for
A hash turns any input into a fixed-length fingerprint: the same input always gives the same hash, and changing a single character changes it completely. It cannot be reversed to get the text back.
Compare a hash with a published one to check that a download or message is intact. For storing passwords, use a slow, salted algorithm such as bcrypt, scrypt or Argon2 instead of any of these — they are built to be fast, which helps attackers guess.
A plain hash proves only that data has not changed since the hash was published: anyone who alters the data can publish a new hash too. An HMAC mixes a secret key into the hash, twice, as RFC 2104 defines, so only someone holding the key can produce it. That is how APIs sign requests and webhooks prove where they came from. A key longer than the hash's block (64 bytes for SHA-256, 128 for SHA-512) is hashed first; a shorter one is padded with zeros. HMAC does not lean on collision resistance, so HMAC-MD5 and HMAC-SHA-1 are not broken the way MD5 and SHA-1 are, though new systems use SHA-256.
SHA-3 and Keccak. SHA-3 is the Keccak design as NIST standardised it in FIPS 202, which changed the padding added to the message. Ethereum adopted Keccak before that change, so its keccak256 is not SHA3-256: the same input gives different hashes, as the example below shows. Both are offered; a value from Solidity or web3 libraries is Keccak-256.
BLAKE3 is a newer hash, many times faster than SHA-256 in software, with a 256-bit output here, its default.
Examples
Checking a published checksum
- Text
- CornerTools
- Pasted
- SHA256 (notes.txt) = 9b4c8d4bd1e1f2fd0bb62a32f9c4fe4c5b54bf6a9ec41ee4d4b0ae3a7bf6a0e2
- Result
- No match; the length fits SHA-256, SHA3-256, Keccak-256 or BLAKE3
The hash is read out of the openssl line. The line names SHA-256 and its 64 hex digits fit it, but it is not this text's SHA-256 (nor any other 256-bit hash of it), so the text is not what was published.
Hashing a word
- Text
- CornerTools
- SHA-256
- 40dcd3c1e406fcdf5bbcf39184b56691439165d0e36018fd3e7697d36e2b86d3
- MD5
- 17a7b26891d39932030b0f9f9d5788ae
With the default options, hex digits show in lowercase. The same text gives these hashes on any machine.
One letter changed
- Text
- cornerTools
- SHA-256
- bf21e22fd301b829105b8579762004a6c44ec594540c5603789a84ff8320dbf1
- MD5
- a428b8fa9a73ebe8fe71cabcf991d0e4
Only the first letter differs from the example above, yet neither hash shares a pattern with the earlier one.
SHA3-256 and Keccak-256 of the same text
- Text
- CornerTools
- SHA3-256
- 0cdd42d1f667e4ed5c40cccee101d783607b8676442191f077264b9c0091268a
- Keccak-256
- 63a98c681ce34d3da89327000b2d54690768ce454cc8308fcdcb854b38c27ed8
Same length, same design, different padding: an Ethereum tool expects the second.
An HMAC with a text key (RFC 4231, test case 2)
- Mode
- HMAC
- Text
- what do ya want for nothing?
- Secret key
- Jefe
- Key is
- Text
- HMAC-SHA-256
- 5bdcc146bf60754e6a042426089575c75a003f089d2739839dec58b964ec3843
This is the published test vector, so any correct HMAC-SHA-256 gives the same value.
The same key written as hex, output as Base64
- Mode
- HMAC
- Text
- what do ya want for nothing?
- Secret key
- 4a656665
- Key is
- Hex
- Output
- Base64
- HMAC-SHA-256
- W9zBRr9gdU5qBCQmCJV1x1oAPwidJzmDnexYuWTsOEM=
4a656665 is "Jefe" in hex, so the key's bytes and the HMAC are those of the example above, written in Base64.
Algorithms
| Algorithm | Bits | Hex characters | Use for |
|---|---|---|---|
| SHA-256 | 256 | 64 | Integrity checks, signatures, general use |
| SHA-512 | 512 | 128 | Same uses; faster than SHA-256 on 64-bit machines |
| SHA-384 | 384 | 96 | TLS and certificate suites |
| SHA-224 | 224 | 56 | Shorter SHA-2 output where space is tight |
| SHA3-256 | 256 | 64 | Where a standard asks for SHA-3, or a second family beside SHA-2 |
| SHA3-512 | 512 | 128 | The same, with the longest SHA-3 output |
| SHA3-384 | 384 | 96 | The same, at 384 bits |
| SHA3-224 | 224 | 56 | The same, at 224 bits |
| Keccak-256 | 256 | 64 | Ethereum addresses, transaction hashes and Solidity's keccak256 |
| BLAKE3 | 256 | 64 | Fast hashing of large files; content-addressed storage |
| SHA-1 | 160 | 40 | Legacy only: collisions are practical |
| MD5 | 128 | 32 | Legacy only: file checksums, never security |
| CRC32 | 32 | 8 | Detecting accidental corruption, not tampering |
Standards
HMAC follows RFC 2104, and is checked against the test vectors of RFC 4231 (SHA-224 to SHA-512) and RFC 2202 (MD5 and SHA-1). SHA-3 follows FIPS 202; Keccak-256 is the same permutation with the original padding; BLAKE3 is checked against its team's published test vectors.
Sources
- RFC 2104: HMAC: Keyed-Hashing for Message Authentication — IETF
- RFC 4231: Identifiers and Test Vectors for HMAC-SHA-224, HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 — IETF
- RFC 2202: Test Cases for HMAC-MD5 and HMAC-SHA-1 — IETF
- FIPS 202: SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions — NIST
- BLAKE3 test vectors — BLAKE3 team
Reviewed
See also
- UUID & ULID Generator — for random identifiers rather than fingerprints of content.
- Password Generator — to create a strong password.