What this hash generator does
It calculates six hashes of your input in one step and shows them in a table, each with a Copy button. Choose lowercase hex, uppercase hex or Base64 for the output. Enter a secret key to turn the five cryptographic hashes into HMACs. Paste a known hash in the compare box and the tool tells you which algorithm it matches.
The hashes of hello
| Algorithm | Hash of hello (hex) |
|---|---|
| MD5 | 5d41402abc4b2a76b9719d911017c592 |
| SHA-1 | aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d |
| SHA-256 | 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 |
| SHA-384 | 59e1748777448c69de6b800d7a33bbfb9ff1b463e44354c3553bcdb9c666fa90125a3c79f90397bdf5f6a13de828684f |
| SHA-512 | 9b71d224bd62f3785d96d46ad3ea3d73319bfbc2890caadae2dff72519673ca72323c3d99ba5c11d7c7acc6e14b8c5da0c4663475c2e5c3adef46f73bcdec043 |
| CRC-32 | 3610a686 |
Which hash should I use?
| You want to | Use |
|---|---|
| Check that a download is not damaged | SHA-256 (or MD5 or SHA-1 if that is what the site publishes) |
| Protect against a deliberate fake | SHA-256 or SHA-512, from a trusted source |
| Sign an API request or webhook | HMAC-SHA256 |
| Store a password | None of these. Use bcrypt or Argon2 |
| Make a short cache key or ETag | MD5 or SHA-1 is fine; a truncated SHA-256 is better |
| Detect random transmission errors | CRC-32 |
Input types
- Text (UTF-8). The usual case. Characters such as é or the euro sign take more than one byte, and the hash depends on the exact bytes.
- Hex bytes. Paste bytes such as 68 65 6c 6c 6f (spaces, colons and 0x are ignored) to hash binary data.
- Base64. Paste Base64 or Base64URL data and the tool hashes the decoded bytes.
Why a hash differs between tools
- A final line break was added or left out. Use the option Ignore the final line break.
- One tool used UTF-16 or another encoding, and this one uses UTF-8.
- The file has CRLF line breaks and the pasted text has LF. Tick Use Windows line breaks.
- One side hashed the hex text, and the other the bytes it stands for. Use the Input is setting.
About CRC-32
CRC-32 is a 32-bit checksum that catches random errors in transmission and storage, such as the checks inside ZIP and PNG files. It is not a cryptographic hash: it is easy to create two inputs with the same CRC, so never use it for security.
HMAC
HMAC is a way of using a hash with a secret key. It proves that a message came from someone who knows the key. For new designs use HMAC-SHA256. The SHA256 generator shows a test value you can compare with.
Single-algorithm pages: MD5, SHA1 and SHA256. To hash a file, use the file hash checker. The hash functions guide explains how the algorithms differ. Your input stays in your browser.