Skip to content

Hash Generator

Compute MD5, SHA-1, SHA-256, SHA-384, SHA-512, SHA3-256 and BLAKE3 hashes of text or a file in one go, then check them against a published checksum.

Input type

Algorithms to compute
Output format

Hash results

  • MD5
  • SHA-1
  • SHA-256
  • SHA-384
  • SHA-512

Files are processed only on this device and are never uploaded to a server. How it works

The text hello converted into its actual SHA-256 hash

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

  1. 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.
  2. 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.”
  3. Under Output format, choose “Hex (lowercase)”, “Hex (uppercase)” or “Base64”.
  4. Hash results lists one line per algorithm you switched on.
  5. 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 hello is 2cf24dba..., but hello followed by a single line break gives 5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03. The second value is what echo hello | sha256sum prints 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.

Sources

Frequently asked questions

I haven't typed anything, but hashes are already showing. Is that a bug?

No. When the text box is empty, the tool shows the hash of a zero-length input. For that input MD5 is d41d8cd98f00b204e9800998ecf8427e and SHA-256 is e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855. If you have run into either value somewhere, it was the hash of an empty file or an empty string.

The value on the download page looks identical to mine, yet I get "Doesn't match any computed hash".

Check three things. First, that algorithm has to be switched on under "Algorithms to compute". Nothing is compared against an algorithm you turned off. Second, paste the hash and nothing else. A prefix like "sha256:" or a file name after the hash makes it count as a mismatch. Third, paste the whole value. The first few characters alone are not compared.

What happens if I switch an algorithm on or off while a file is being hashed?

The run in progress is thrown away and the file is read again from the beginning. With a large file it is quicker to settle on your algorithms before you add the file. "Output format" only rewrites values that are already computed, so changing it doesn't trigger a new run.

Can I add several files at once?

It hashes one file at a time. If you drop several, only the first is taken. Adding another file replaces the previous file's results with the new ones.

Is it OK to store passwords as SHA-256 hashes?

It's not recommended. OWASP explains that fast hashes such as SHA-256 are a poor fit for password storage. Because they are quick to compute, an attacker can also try a large number of guesses in a short time. For passwords, use a function that is slow on purpose, such as Argon2id, scrypt or bcrypt, and keep the hashes from this tool for jobs like checking files.

Can I use MD5 or SHA-1 to verify file authenticity?

MD5 and SHA-1 still turn up as checksums all the time, but they can't be trusted wherever someone might tamper with the data on purpose. Methods are known for producing a "collision", two different inputs with the same hash value. NIST has said that today's computers can create a fraudulent message with the same SHA-1 hash as the original, and it recommends phasing SHA-1 out by December 31, 2030 and moving to SHA-2 or SHA-3. • For simply spotting a file that was damaged in transit, MD5 and SHA-1 will do. • Where forgery has to be prevented, as with digital signatures and certificates, use SHA-256 or stronger. • If a publisher lists both MD5 and SHA-256, check against SHA-256.

Open-source software used: hash-wasm (MIT)

Last updated: