Free tool
Hash Generator: MD5, SHA-1, SHA-256, SHA-512 & HMAC
Generate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes and HMACs for text or files in your browser. Nothing is uploaded, so private data stays private.
- MD5
–
- SHA-1
–
- SHA-256
–
- SHA-384
–
- SHA-512
–
Assumptions and limits
- Text is encoded as UTF-8 with no added newline. Files are hashed byte for byte (up to 100 MB).
- SHA-1, SHA-256, SHA-384, SHA-512 and HMAC-SHA use your browser's Web Crypto API. MD5 and HMAC-MD5 use a small implementation checked against the published RFC 1321 and RFC 2202 test vectors.
- MD5 and SHA-1 are broken for security purposes. Use them to match existing checksums only.
- A plain hash is not a safe way to store passwords.
Runs entirely in your browser. Nothing you type or upload is sent to our servers.
How the hash generator works
Type or paste text, or pick a file, and the page computes MD5, SHA-1, SHA-256, SHA-384 and SHA-512 at once. Add a secret key and the same five algorithms produce HMAC values instead. Everything runs locally, so private text and files stay on your device.
Worked example 1: a known test vector
The text abc (3 bytes) hashes to 900150983cd24fb0d6963f7d28e17f72 with MD5 and to ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad with SHA-256. These are the published values from RFC 1321 and the SHA-2 standard, and the page opens with abc so you can confirm them. An MD5 digest is 128 bits = 32 hex characters, and SHA-256 is 256 bits = 64 hex characters.
Worked example 2: an HMAC test vector
With the key Jefe and the text what do ya want for nothing?, HMAC-SHA-256 is 5bdcc146bf60754e6a042426089575c75a003f089d2739839dec58b964ec3843 (RFC 4231, test case 2), and HMAC-MD5 is 750c783e6ab0b503eaa86e310a5db738 (RFC 2202). Enter them to see your own tool chain agree.
Choosing an algorithm
Digest length is fixed by the algorithm. Each hex character carries 4 bits, so MD5 at 128 bits = 32 characters, SHA-1 at 160 bits = 40, SHA-256 at 256 bits = 64, SHA-384 at 384 bits = 96 and SHA-512 at 512 bits = 128 characters.
- SHA-256 is the usual choice for file checksums and signatures.
- SHA-512 gives a longer digest and is often faster on 64-bit machines for large inputs.
- MD5 and SHA-1 only to match older systems.
Related tools
To encode data as text, use the Base64 Encode & Decode tool. To create strong random secrets, try the Password & API Key Generator, and to check structured data see the JSON Formatter.
Frequently asked questions
What is a hash, and what is it used for?
A hash function turns any input into a fixed-length fingerprint. The same input always gives the same output, and a tiny change gives a completely different one. People use hashes to check that a file was not altered or corrupted in transfer, to compare data without sharing it, and as a building block inside signatures and password storage systems.
Is MD5 or SHA-1 safe to use?
Not for security. Researchers have shown how to create two different inputs with the same MD5 or SHA-1 hash, so neither should protect signatures, certificates or passwords. They are still used to match old checksums and identify files where no attacker is involved. For anything security related, use SHA-256 or SHA-512.
Can I use a hash to store passwords?
Not a plain one. Fast hashes such as SHA-256 let attackers test billions of guesses per second. Passwords should be stored with a slow, salted password hashing function such as Argon2, scrypt or bcrypt, built into your framework or library. This page is for checksums and testing, not for choosing how to store passwords.
What is HMAC and when do I need it?
HMAC combines a secret key with a hash so the result proves both the content and that the sender knew the key. Webhooks and API requests often include an HMAC signature. Enter your key in the secret key field and every result becomes an HMAC computed with that key and the selected algorithm.
How do I check a downloaded file against its published checksum?
Choose the file with the file picker, then compare the hash for the algorithm the publisher lists, usually SHA-256, with the published value. Letter case does not matter. If even one character differs, the file is different from the one the publisher hashed, and you should download it again from the official source.
Why does my hash not match another tool?
Most mismatches come from different bytes being hashed. A trailing newline, a different text encoding, or Windows line endings change the result. This page hashes your text as UTF-8 exactly as typed, with no added newline. Check that both sides hash the same bytes, and that HMAC uses the same key.
Are my text and files uploaded?
No. Hashing runs in your browser, using the built-in Web Crypto API for SHA and a small MD5 implementation on this page. Your text, key and files never leave your device, and analytics record only that the tool was used.
Link to this tool
Found it useful? Copy a link for your page, newsletter or documentation.
Get new tools and guides by email
Optional. The tool above works without signing up.
More free tools
Browse all developer tools or the full list of free tools.
- Base64 Encode & Decode (UTF-8, URL-Safe, Files)Encode and decode Base64 with UTF-8 support and a URL-safe option, or turn a file into a Base64 data URI. Runs in your browser; nothing is uploaded.
- Morse Code TranslatorTranslate text to Morse code and Morse to text, play it as sound at an adjustable speed, or show it as a flashing light. Runs in your browser.
- Binary to Text ConverterConvert binary to text and text to binary with correct UTF-8 handling for accented letters and emoji. Paste, copy and swap direction in your browser.
- Invisible Character Copy and PasteCopy real invisible Unicode characters such as the Hangul filler and zero width space, with names and categories, and find hidden characters in pasted text.
- Loan Calculator & Amortization ScheduleFind your monthly payment, total interest and a full amortization schedule, and see how extra payments shorten the loan. Month-by-month working, in your browser.
- Car Payment Calculator with Trade-In & Sales TaxEstimate a monthly car payment from price, trade-in, down payment, APR, term and your sales tax rate, with the amortization schedule and cash due at signing.