Hash Generator: MD5, SHA-1, SHA-256 and SHA-512
By TheToolsBank Editorial TeamLast updated:
What a hash is
A hash function turns any input into a fixed-length string, often called a digest or fingerprint. The same input always gives the same hash. Change one letter, one space or one line break, and the hash changes completely.
Hashing is one-way. You cannot turn a hash back into the original text. That makes it different from encryption, which is built to be reversed with a key, and from encoding such as Base64, which anyone can reverse. If you need to make data readable again later, use the Base64 Encoder/Decoder for encoding or a real encryption tool, not a hash.
How to use the hash generator
- Type or paste your text into the box.
- Select Generate hashes. All four hashes appear together.
- Select the copy icon next to the hash you need.
- If you edit the text, the old hashes clear straight away, so you never see a result that doesn't match. Select Generate hashes again for the new ones.
- Select Clear to empty the box and the results.
MD5 vs SHA-1 vs SHA-256 vs SHA-512
| Algorithm | Output length | Hex characters | Safe for security? |
|---|---|---|---|
| MD5 | 128 bits | 32 | No. Collisions are easy to create. |
| SHA-1 | 160 bits | 40 | No. Practical collisions have been shown. |
| SHA-256 | 256 bits | 64 | Yes, for integrity checks and signatures. |
| SHA-512 | 512 bits | 128 | Yes, for integrity checks and signatures. |
A collision means two different inputs that produce the same hash. Once collisions can be made on purpose, an attacker can swap a harmless file for a harmful one with the same hash. That is why MD5 and SHA-1 should not be used for signatures, certificates or anything where someone might cheat. They are still fine for spotting accidental damage, like a corrupted download.
SHA-256 and SHA-512 are both part of the SHA-2 family. SHA-256 is the common default for checksums, APIs and software downloads. SHA-512 gives a longer output and can run faster on 64-bit processors.
Example hashes you can check
Use these to confirm you get the same results as other tools. Each input is the lowercase word with no space or line break after it.
| Input | Algorithm | Hash |
|---|---|---|
| hello | MD5 | 5d41402abc4b2a76b9719d911017c592 |
| hello | SHA-1 | aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d |
| hello | SHA-256 | 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 |
| Hello | SHA-256 | 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969 |
Notice that changing just the first letter to a capital gives a totally different SHA-256 hash. If you add a line break after hello, the SHA-256 becomes 5891b5b5... instead. Hidden spaces and line breaks are the most common reason two hashes do not match.
Hashing passwords and checking files
Do not store passwords as plain MD5, SHA-1 or even SHA-256 hashes. These are designed to be fast, which lets attackers test billions of guesses. Passwords need a slow, salted algorithm such as bcrypt, scrypt or Argon2, which your programming language or framework should provide. To create a strong password in the first place, use the Password Generator.
This tool hashes text only. It does not open files, so it cannot verify a file download checksum. To check a file, use your system's built-in command, then compare the result with the checksum the publisher lists:
- Windows (PowerShell):
Get-FileHash file.zip -Algorithm SHA256 - macOS:
shasum -a 256 file.zip - Linux:
sha256sum file.zip
Common Mistakes to Avoid
Copying text with a trailing space or line break
Solution:
Using MD5 or SHA-1 for security
Solution:
Comparing hashes in different formats
Solution:
Expecting results to update as you type
Solution:
Frequently Asked Questions
MD5 and SHA-1 are broken for security
Both algorithms have known collision vulnerabilities, meaning two different inputs can be crafted to produce the same hash. Neither should be used for passwords or anything security-critical, though they remain fine for basic checksums.
SHA-256 and SHA-512 are the modern standard
Part of the SHA-2 family, both remain cryptographically secure today. SHA-512 produces a longer hash and can be faster on 64-bit hardware; SHA-256 is more common in web contexts.

