Hash Generator: MD5, SHA-1, SHA-256, SHA-512 and HMAC
Type or paste text, or choose a file, and get its MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes at once. Switch the output between lowercase hex, uppercase hex and Base64. If you have a checksum from a download page or a colleague, paste it into the compare box and the tool says whether it matches and which algorithm it matched.
Turn on HMAC to mix a secret key into the hash with SHA-1, SHA-256, SHA-384 or SHA-512, the way many APIs sign requests. Files are read on your device in pieces with a progress bar and a Cancel button, up to 100 MB. Nothing is sent to a server and the key you type is never stored.
Drop a file here
or
The file stays on your device. It is not uploaded. Up to 100 MB.
- MD5 and SHA-1 are broken for security. Use them only to catch accidental changes.
- A hash is not encryption. It cannot be turned back into the original data.
- Do not store passwords as plain MD5 or SHA hashes. Use a slow, salted method such as bcrypt, scrypt or Argon2.
- This is a calculator. It is not a password manager or a security product.
What a hash is, and what it is not
A hash function turns any amount of data into a short fixed-size fingerprint. The same input always gives the same fingerprint, and a tiny change in the input gives a completely different one. That makes hashes useful for checking that a downloaded file arrived intact, for finding duplicate files, and as a building block inside other systems. A hash is not encryption: there is no key and no way to get the original data back from it.
Algorithms differ in strength. MD5 and SHA-1 are broken for security purposes, because different inputs with the same hash can be created on purpose, so they must not be used for signatures or to prove that data was not tampered with by someone hostile. They are still fine for catching accidental corruption and for matching old checksums. SHA-256, SHA-384 and SHA-512 belong to the SHA-2 family and are not known to be broken. One more warning: plain SHA or MD5 hashes are not suitable for storing passwords, because they are fast to guess at. Real password storage uses slow, salted methods such as bcrypt, scrypt or Argon2. This page is a calculator, not a password or security product.
HMAC (RFC 2104) combines a hash with a secret key, so only someone who has the key can produce or check the value. It is used to sign API requests and webhooks. SHA-1, SHA-256, SHA-384 and SHA-512 hashes and HMACs come from the Web Crypto API built into your browser, which only works on secure pages (https or localhost). MD5 is not in Web Crypto, so this page includes its own small implementation, checked against the official test vectors.
- MD5, SHA-1, SHA-256, SHA-384 and SHA-512 calculated together.
- HMAC with SHA-1, SHA-256, SHA-384 or SHA-512 and a secret key that is never stored.
- Text or file input; files up to 100 MB are read locally with progress and Cancel.
- Output as lowercase hex, uppercase hex or Base64.
- Compare with a pasted hash and see a clear match or no match.
- Plain notes about what MD5, SHA-1 and hashing can and cannot do.
How to use the Hash Generator
- Choose Text and type, or choose File and pick or drop a file.
- Read the hashes. Change the output format if you need Base64 or uppercase.
- To check a download, paste the expected checksum into the compare box.
- For HMAC, tick the option and type the secret key.
Is it private?
Yes. Hashes are calculated by your own browser. Text, files and HMAC keys are not uploaded, not stored and not sent to any service.
Read our tools privacy policy →
Frequently asked questions
Can I use MD5 or SHA-1 for security?
No. Both are broken for security use, because two different inputs with the same hash can be made on purpose. They remain useful for spotting accidental changes, such as a damaged download, and for matching checksums that a site only publishes in those forms. For anything where an attacker could be involved, use SHA-256 or stronger.
Can I hash passwords with this to store them?
No. Plain MD5 or SHA hashes are fast to guess, so stolen password hashes are easy to crack. Passwords need a slow, salted method such as bcrypt, scrypt or Argon2, which a server-side library provides. This tool is for checksums and for working out what a hash of some data looks like.
Can a hash be reversed to get the original text?
Not by calculation. A hash throws information away. Short or common inputs can be found by guessing and comparing, which is why weak passwords can be cracked, but a hash is not encryption and there is no key to unlock it.
What is HMAC and which key format does the tool use?
HMAC is a hash that depends on a secret key, used to sign and verify messages. The key you type is read as UTF-8 text, and the message is the text or file you chose. The result matches what standard HMAC libraries produce for the same key and message.
How big a file can I hash?
Up to 100 MB. The file is read on your device in slices with a progress bar and you can cancel. The SHA algorithms in the browser need the whole file in memory at once, so very large files could fail on phones with little memory, and the tool says so instead of freezing.
Is my text or file uploaded?
No. Everything is calculated in your browser. Files and text are not uploaded, the secret key is kept only in the open page and nothing is stored.