Hash Generator
Generate MD5, SHA-1, SHA-2 and SHA-3 digests, plus HMAC, for text or files — entirely in your browser. Verify a download against a published checksum, or compare two hashes character by character.
{{ textCount }}
{{ textError }}
{{ r.value }}
{{ legacyNames }} {{ legacyNames.indexOf(' and ') === -1 ? 'is' : 'are' }} selected. Practical collisions are public for both, so treat the result as a checksum for spotting accidental corruption — not as evidence that a file is authentic.
Drop files here to hash them
Up to 100 files · any size · read in 4 MB chunks, never uploaded
Files are read, not uploaded. Each one is streamed through the hash function in chunks straight from disk, so a multi-gigabyte image never lands in memory and never leaves your device.
{{ f.error }}
{{ r.value }}
The key never leaves this page. It is not sent to a server, not saved to local storage, and not written into the exported files.
{{ hmacError }}
{{ hmacResult }}
HMAC is not a hash with the key glued on the front. It runs the key through the hash
twice with two different pads, which is what makes it resistant to the length-extension
attacks that break a naïve hash(key + message).
Drop the file you want to check
Hashed in your browser · never uploaded
{{ lengthProblem || vError }}
Hash matches
The {{ vResult.label }} digest of {{ vFile.name }} is identical to the hash you supplied, so this is the file that checksum describes. Letter case and surrounding whitespace were ignored.
Both {{ vResult.computed }}
Hash does not match
This file is not the one that checksum describes. Either the download is incomplete or corrupted, or the file has been altered. Downloading it again is the first thing to try.
Computed {{ vResult.cHead }}{{ vResult.cChar }}{{ vResult.cTail }}
Expected {{ vResult.eHead }}{{ vResult.eChar }}{{ vResult.eTail }}
First difference at character {{ vResult.diffAt + 1 }}.
Paste a hash into both boxes to compare them.
Hashes match
Both are the same {{ cmpResult.len }}-character value, so they identify identical content.
Ignored while comparing: letter case, spaces, line breaks, and any
sha256:-style prefix.
Both {{ cmpResult.a }}
Length {{ cmpResult.len }} — consistent with {{ cmpResult.guess }}.
Hashes are different
These are different lengths — {{ cmpResult.a.length }} and {{ cmpResult.b.length }} characters — so they are digests from two different algorithms, and comparing them tells you nothing about the content.
These two digests differ, so they describe different content.
Hash A {{ cmpResult.aHead }}{{ cmpResult.aChar }}{{ cmpResult.aTail }}
Hash B {{ cmpResult.bHead }}{{ cmpResult.bChar }}{{ cmpResult.bTail }}
First difference at character {{ cmpResult.diffAt + 1 }}.
Text, files and secret keys are hashed in your browser. Nothing you enter is ever uploaded to a server.
How hashing works
A hash function reads any amount of data and returns a fixed-length fingerprint of it. One character and a four-gigabyte disk image both come out as the same number of hex characters, because a digest is a fingerprint rather than a compressed copy. The same input always gives the same output, and any change to the input gives a completely different one.
A hash is not encryption
Encryption is reversible by design: with the key you get the original back. Hashing is one-way and lossy — there is no key and no decrypt operation, and the output is far too small to contain the input. When a site offers to “decrypt MD5” it is looking the value up in a table of pre-computed hashes of common inputs, which only works when somebody already guessed yours.
What “broken” means for MD5 and SHA-1
Both are broken for collision resistance: an attacker can construct two different files with the same digest. MD5 collisions have been practical since 2004 and SHA-1's were demonstrated in 2017. Neither is broken in the sense of revealing the original input, which is why they survive as checksums for accidental corruption. Neither should gate a security decision.
Choosing an algorithm
| Algorithm | Bits | Hex length | Use it for |
|---|---|---|---|
| MD5 | 128 | 32 | Legacy checksums only |
| SHA-1 | 160 | 40 | Legacy systems, Git object ids |
| SHA-256 | 256 | 64 | The default for anything new |
| SHA-384 | 384 | 96 | Subresource integrity |
| SHA-512 | 512 | 128 | Speed on 64-bit hardware |
| SHA3-256 | 256 | 64 | A design independent of SHA-2 |
Never plain hashing for passwords
Every algorithm here is designed to be fast, and speed is exactly what makes brute-forcing stolen password hashes viable. Password storage needs a deliberately slow, per-user-salted, memory-hard function: Argon2id, bcrypt, scrypt or PBKDF2. Hashing a password with SHA-256, even with a salt, is not equivalent.
See also the File Hash Generator.
Frequently asked questions
What does a hash generator do?
It reads your input and returns a fixed-length fingerprint of it. The same input always gives the same fingerprint, and any change at all — even one bit — gives a completely different one. That is what makes digests useful for spotting corruption or tampering.
Can I hash a file without uploading it?
Yes, and that is how this tool works. Your browser reads the file from disk in 4 MB chunks and feeds them through the hash function locally. Nothing is transmitted, so file size is limited by your device rather than by an upload.
Why does changing one character change the whole hash?
Hash functions are designed so every input bit influences every output bit. Roughly half the output bits flip for any single-bit change, which is why there is no such thing as a nearly-correct digest.
Can a hash be decrypted?
No. Hashing throws information away and has no key, so there is nothing to reverse. Sites offering to "decrypt MD5" are looking the value up in a table of pre-computed hashes of common inputs, which only works if somebody already guessed your input.
Which algorithm should I choose?
SHA-256 for almost everything. SHA-512 is often faster on 64-bit hardware and gives a longer digest. SHA-3 when you specifically want a different internal design. MD5 and SHA-1 only to match a checksum somebody else already published.
Is any of this suitable for storing passwords?
No. Every algorithm here is built to be fast, which is exactly wrong for passwords. Use Argon2id, bcrypt, scrypt or PBKDF2, which are deliberately slow and salted per user.