About the Hash Generator
The Hash Generator turns text or a file into five fingerprints at once: MD5, SHA-1, SHA-256, SHA-384 and SHA-512. Paste an expected checksum to see which hash it matches, which is the quickest way to verify a download.
How it works
Your text is first encoded as UTF-8 bytes, so accented letters and emoji hash the same way they would in most programming languages. Those bytes are passed to crypto.subtle.digest, the browser's native implementation of the SHA family, once for each algorithm.
Each digest is returned as raw bytes and converted to lowercase hex, two characters per byte. That gives 40 characters for SHA-1 (160 bits), 64 for SHA-256 (256 bits) and 128 for SHA-512 (512 bits). Clicking a result card highlights it, which is handy when comparing values; all three are always calculated.
How to use
- 1
Type or paste text, or switch to File and drop a file.
- 2
Read the hashes shown below.
- 3
Paste an expected checksum into Verify, or click Copy on the hash you need.
Worked examples
Hashing a short word
You need reference values for the string hello in a unit test.
These are the standard digests of the five UTF-8 bytes of hello. The SHA-512 card shows a 128-character value starting 9b71d224bd62f378.
One space makes a difference
Comparing hello world with hello.
Adding a space and a word produces a completely different hash. A trailing space or newline in your input will change the result too.
Frequently asked questions
Which hash algorithm should I use?+
SHA-256 is the usual choice today. SHA-512 is equally strong with a longer output. SHA-1 has practical collision attacks and should only be used where an older system requires it.
Can a hash be reversed back into the original text?+
No. Hash functions are one-way. Short or common inputs can sometimes be found by guessing and comparing, which is why hashes of passwords need salting and slow algorithms.
Why does my hash not match the one from another tool?+
Usually the input differs slightly, such as a trailing newline, different line endings or a different text encoding. This tool hashes exactly the characters in the box as UTF-8.
Why is MD5 included if it's broken?+
Many download pages and older systems still publish MD5 checksums, so it's useful for checking files. It's marked as not collision-resistant and shouldn't be used for security.
Is the same input always going to give the same hash?+
Yes. SHA hashes are deterministic, so identical bytes always produce identical digests on any device.