What a hash is
A hash is a calculation that boils data of any length down to a value of fixed length. The same input always gives the same value, and the slightest change to the input changes the whole value. You can’t rebuild the original data from the result.
Type hello into the text box and SHA-256 gives 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824. Capitalize the first letter and Hello gives 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969, which has nothing in common with the first. That is why comparing two hash values is enough to tell whether two pieces of data are the same. A hash used for this kind of check is also called a checksum.
How to use it
- Under Input type, pick “Text” or “File”. Text goes into the “Text to hash” box. A file can be dropped in or selected, and any file type works.
- Under Algorithms to compute, switch on the ones you need. Each button toggles on and off with a click, and several can be on together. Turn them all off and you see “Select at least one algorithm.”
- Under Output format, choose “Hex (lowercase)”, “Hex (uppercase)” or “Base64”.
- Hash results lists one line per algorithm you switched on.
- If you have a value to check against, paste it into Compare with an expected hash.
| Algorithm | Hash length | Hex digits | On by default |
|---|---|---|---|
| MD5 | 128 bits | 32 | Yes |
| SHA-1 | 160 bits | 40 | Yes |
| SHA-256 | 256 bits | 64 | Yes |
| SHA-384 | 384 bits | 96 | Yes |
| SHA-512 | 512 bits | 128 | Yes |
| SHA3-256 | 256 bits | 64 | No |
| BLAKE3 | 256 bits | 64 | No |
SHA3-256 is the same length as SHA-256, but it belongs to the SHA-3 family, which is built differently from SHA-2, so the same input gives a different value. BLAKE3 is not part of any standard from the U.S. National Institute of Standards and Technology (NIST). In Base64 the same value takes fewer characters: 24 for MD5 and 44 for SHA-256.
Checking that a download matches the original
Some download pages list a hash next to the file, something like “SHA-256: 3a7bd3e2…”. Switch the input type to “File”, add the file you downloaded, and paste that value into “Compare with an expected hash”.
- If it equals the value of any algorithm you have switched on, you see a message such as “Matches SHA-256.” telling you which one, and that line is highlighted in the results. You don’t need to know which algorithm the pasted value came from.
- If nothing is equal, you see “Doesn’t match any computed hash.” In that case, download the file again.
The comparison ignores upper and lower case in hex, a leading 0x, and any spaces, colons (:) or hyphens (-) inside the value. A value written in pairs, like 5D:41:40:2A:..., can be pasted as it is. Base64 values are recognized whatever output format is selected, but they have to match exactly, including case.
A match means your file is the same as the file the publisher hashed. If the hash on the download page was itself swapped out, this check can’t tell you.
When a text hash differs from another tool’s result
Text is converted to UTF-8 bytes before it is hashed. Every character counts, including the ones you can’t see, so when another tool disagrees, a line break is usually to blame.
- SHA-256 of
hellois2cf24dba..., buthellofollowed by a single line break gives5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03. The second value is whatecho hello | sha256sumprints in a terminal, because echo adds a line break at the end. - Text saved to a file in Notepad can also hash differently from the same text pasted in. If the file isn’t encoded as UTF-8, or uses a different kind of line break, the bytes are different. When you need the hash of a file, add it as a “File” instead of pasting its contents.
How large files are handled
A file is never loaded into memory in one piece. It is read and hashed 16 MiB at a time. All the algorithms you switched on work through the same chunk together, so the file isn’t read once per algorithm. While it runs you see a “Hashing…” progress bar, and if you cancel you see “Hashing cancelled.”
The hashing itself is done by hash-wasm, a library built on WebAssembly.
