MD5 / SHA-256 Hash Generator
Type or paste text to see its MD5, SHA-1, SHA-256 and SHA-512 hashes at once. The work is done on your device, so the text never leaves this page.
SHA-256 (64 hex digits)
SHA-512 (128 hex digits)
MD5 (32 hex digits, checksums only)
SHA-1 (40 hex digits, checksums only)
MD5 and SHA-1 are fine for spotting accidental changes, but they are not safe for passwords or security. Use SHA-256 or SHA-512 when it matters.
This tool runs in your browser. Nothing you type is uploaded or saved, and there is nothing to install or sign up for.
What a hash is and what this generator gives you
A hash function takes any amount of data and boils it down to a short, fixed-length string of hex digits, often called a digest or fingerprint. The same input always gives the same hash. Change a single letter and the result looks completely different. And there is no practical way to run the process backward to recover the original text from the hash alone.
This page computes four well-known hashes of whatever you type: MD5, SHA-1, SHA-256 and SHA-512. People use them to confirm that a download or a pasted block of text arrived unchanged, to label data with a compact ID, and to learn how fingerprints work in computer science classes.
Using the hash generator
- Type or paste into Text to hash. All four hashes update with every keystroke.
- Choose lower-case or upper-case Hex letters to match the format you are comparing against.
- If someone gave you a hash to check, paste it into Compare with this hash. The Compare row tells you whether it matches and which algorithm it belongs to.
- Press the small Copy button beside one hash, or Copy all four for a labeled list.
- Reset returns to the sample text.
The calculation runs in your browser. Nothing you type is sent anywhere or stored.
Worked example: the hashes of abc
Type the three letters abc, with no space or line break after them. They are the classic test input for these algorithms, and the tool returns:
- MD5:
900150983cd24fb0d6963f7d28e17f72 - SHA-1:
a9993e364706816aba3e25717850c26c9cd0d89d - SHA-256:
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
Now clear the box completely. Even empty text has a hash: the MD5 of nothing is d41d8cd98f00b204e9800998ecf8427e and the SHA-256 of nothing starts e3b0c442. If you ever see those values where you expected the hash of a real file or message, the data was empty.
The page opens with Hello, World!, whose SHA-256 begins dffd6021. Delete the exclamation mark and watch every digit change. That behavior is the whole point: a tiny edit cannot hide.
The four algorithms side by side
| Algorithm | Hex digits | Bits | Sensible use today |
|---|---|---|---|
| MD5 | 32 | 128 | Checksums against accidental change only |
| SHA-1 | 40 | 160 | Checksums and old systems that still need it |
| SHA-256 | 64 | 256 | General-purpose secure hash |
| SHA-512 | 128 | 512 | Same family as SHA-256 with a longer result |
Each hex digit carries four bits, which is why a 256-bit hash is 64 digits long. The length never depends on the input: one letter and a whole essay both give 64 digits of SHA-256.
How the text becomes a hash
First the text is converted to bytes using UTF-8. Plain English letters are one byte each, while accented letters and emoji take two to four. The bytes are then padded to a fixed block size and fed through many rounds of bit mixing: shifts, rotations and additions that are defined exactly by each algorithm. The final internal state is written out as hex.
Because the hash is built from bytes, things you cannot see still count. A space at the end, a line break, or a different kind of quote mark all produce a different result. The rows under the hashes point out line breaks and spaces at the ends for this reason.
Why MD5 and SHA-1 are not for security
A secure hash should make it impossible in practice to find two different inputs with the same hash, known as a collision. MD5 no longer meets that bar. RFC 6151, published in March 2011 (read December 2026), states that MD5 is no longer acceptable where collision resistance is required, such as digital signatures, while noting that using an MD5 checksum only to guard against errors is still acceptable.
SHA-1 has followed the same path. In an announcement dated December 15, 2022 (read December 2026), NIST said SHA-1 should be phased out by December 31, 2030 and recommended that anyone relying on it for security move to the SHA-2 or SHA-3 families. SHA-256 and SHA-512 both belong to SHA-2.
Do not store passwords as a plain hash from this page, whichever algorithm you pick. These functions are built to be fast, which helps an attacker guess. Real systems use dedicated, deliberately slow password-hashing methods with a unique salt for each user.
Mistakes that make hashes disagree
- A hidden line break. Many command-line tools add a newline when you echo text. The hash of
abcand the hash ofabcplus a newline are unrelated. - Different line endings. Text saved on Windows often uses two bytes per line break. This page hashes each line break as a single line feed, so a multi-line file hashed elsewhere may differ.
- Comparing upper case with lower case. The digits are the same value either way. The compare box ignores case and spaces for you.
- Expecting to reverse it. A hash cannot be decoded. If you need to get the text back, you want an encoding such as the one in the Base64 encoder and decoder.
- Hashing files. This page works on typed or pasted text up to 100,000 characters. It does not read files from your device.
Ideas for lessons and everyday checks
For a quick classroom demo, have each student hash their first name with SHA-256 and compare results. No two match, yet every result has the same length. Then ask them to change one letter to upper case and count how many of the 64 digits stay the same. To see where the changes are, paste two hashes into the diff checker.
When you share a long piece of text and want the other person to confirm they received it intact, send the SHA-256 alongside it. They paste the text here, put your hash in the compare box and look for the word Match. If you need a strong random secret instead of a fingerprint, use the password generator, and for a random unique label try the UUID generator. Hex digits themselves are explained by the hex calculator.
More utilities like this are grouped under tech tools, and the complete set of free calculators and converters is on the tools home page.
Frequently asked questions
Can a hash be reversed to get the original text?
No. A hash is a one-way fingerprint, not an encoding. The only way to find an input for a given hash is to guess inputs and hash each one, which is why short or common passwords are still at risk.
What is the MD5 hash of an empty string?
It is d41d8cd98f00b204e9800998ecf8427e. Seeing that value usually means the data that was hashed had zero bytes.
How long is a SHA-256 hash?
A SHA-256 hash is 256 bits, written as 64 hex digits. The length is the same no matter how long the input is.
Is MD5 still safe to use?
Only as a checksum against accidental changes. It is not safe for passwords, signatures or anything where someone might try to forge a match, because different inputs with the same MD5 hash can be created on purpose.
Why is my hash different from the one another tool gave me?
The inputs are almost certainly not identical byte for byte. Look for an extra space or line break at the end, different line endings, or a different text encoding.
Is my text uploaded when I use this hash generator?
No. The hashes are calculated by a script running in your browser, and the text is not sent to a server or saved.
