Hash Generator
Hash text or a file with MD5, SHA-1, SHA-256, SHA-384, SHA-512, CRC32 and Adler-32 at once, and check a hash you were given against the result.
Overview
A hash function turns input of any size into a fixed-length value, the hash or digest. The same input always gives the same hash, and the smallest change gives a completely different one, which is why hashes are used to check that a download or a message arrived unchanged. A cryptographic hash is also one-way: the input cannot be worked out from it.
Web interface
Type or paste text into the input, or use Upload file or drop a file onto it; all seven hashes appear at once. The copy icon next to each hash copies it. The line under the results gives the size of the input and how long the hashing took. The dice in the corner of the input loads a random example text.
Verify takes a hash you were given, for example from a download page, and says whether it matches. See Verify.
Algorithms
| Algorithm | Length | Use |
|---|---|---|
| MD5 | 128 bits, 32 hex digits | checksums only; broken for security since 2004 |
| SHA-1 | 160 bits, 40 hex digits | legacy; collisions have been produced in practice, Git still names objects with it |
| SHA-256 | 256 bits, 64 hex digits | the common choice today |
| SHA-384 | 384 bits, 96 hex digits | SHA-512 with other start values, shortened |
| SHA-512 | 512 bits, 128 hex digits | the largest SHA-2 |
| CRC32 | 32 bits, 8 hex digits | error detection, not security: Ethernet, ZIP, PNG, gzip |
| Adler-32 | 32 bits, 8 hex digits | error detection in the zlib format; faster than CRC32 and weaker |
The SHA family is computed by the browser's own Web Crypto, MD5, CRC32 and Adler-32 by the page. All seven were checked against Node.js on text with umlauts and emoji and on a binary file, and match. None of them is meant for storing passwords; that takes a slow hash such as bcrypt, scrypt or Argon2.
Text and files
Text is hashed as UTF-8, so ü is the two bytes C3 BC, as on every modern system.
A browser turns every line break in a text field into a line feed, so text with Windows line breaks gives a
different hash when pasted than the same text as a file. For an exact match with a file, upload the file.
Files are hashed byte for byte, up to 10 MB. An empty input shows no hashes.
Verify
The field takes a hash in hex, in any case and with spaces around it. Its length says which algorithm it can be: 32 digits MD5, 40 SHA-1, 64 SHA-256, 96 SHA-384, 128 SHA-512, and 8 either CRC32 or Adler-32, so both are compared. The result says which algorithm matched, or that none did.
| Message | Meaning |
|---|---|
Not a valid hex string | The field holds something other than the digits 0 to 9 and the letters a to f. |
Unknown algorithm length | No algorithm here makes a hash of that many digits. |
Enter input above to compare | There is nothing hashed yet to compare with. |
No API
There is no API for this tool. Hashing runs in the browser; on the command line, sha256sum,
shasum -a 256, md5sum or openssl dgst -sha256 give the same results,
and Get-FileHash does on Windows.
Privacy
Nothing leaves the browser. Text and files are hashed on the page, nothing is uploaded or stored, and Copy writes to the clipboard only when you press it.