How to use this Hash Generator
Choose the hashing algorithm you want to use, enter your text, and click
Generate Hash. The page will create the corresponding MD5 or SHA256 value
instantly. You can then copy the output and compare it against another expected value if
needed.
- Select either MD5 or SHA256.
- Paste or type the text you want to hash.
- Click Generate Hash.
- Copy the result for comparison or reference.
Common use cases
- Compare text fingerprints
- Check whether two inputs match
- Generate test checksum values
- Support development and debugging
- Learn how hashing behaves with different inputs
Important behavior
Hash outputs are deterministic for the same algorithm and the same exact input. That
means identical text produces identical results, while even tiny differences such as a
space, line break, or capitalization change will generate a different hash.
Hashing is one-way — and it is not encryption
A hash function maps any input to a fixed-length digest — 128 bits for MD5, 256 for SHA-256
— and it is deliberately one-way. There is no key and no "decrypt" step;
you cannot run the digest backwards to recover the input. The only way to find the text
behind a hash is to hash candidate inputs until one matches, which is guessing, not
reversing.
This is the single most common misconception, so it is worth stating plainly: hashing
is not encryption. Encryption is reversible with a key and is meant to keep data
confidential; hashing is irreversible and is meant to produce a stable fingerprint you can
compare. When a site "reverses" an MD5, it is looking the digest up in a precomputed table
of common inputs — not decrypting it.
Which property of MD5 and SHA-1 actually broke
"MD5 is broken" and "SHA-1 is broken" are true, but they are widely misread. A hash has
three security properties, and only one of them fell:
- Collision resistance — hard to find any two inputs with the
same hash. This is what broke.
- Preimage resistance — given a hash, hard to find an input that produces
it. This still holds practically.
- Second-preimage resistance — given one input, hard to find a different
input with the same hash. Also still holds practically.
For MD5, real chosen-prefix collisions are cheap today — the Flame malware
used one to forge a Windows code-signing certificate. For SHA-1, the 2017 SHAttered result
produced an actual collision and the 2020 "SHA-1 is a Shambles" work made chosen-prefix
collisions affordable. But there is still no practical preimage attack on
either: you cannot take an arbitrary MD5 digest and compute a matching input. So the correct
takeaway is precise — never use MD5 or SHA-1 where an attacker could benefit from two
inputs colliding (signatures, certificates, dedup keys), but the digest of a
secret input is not something they can simply invert.
Never store passwords with SHA-256 or MD5
This is the mistake that leaks entire databases. SHA-256 and MD5 are fast —
a commodity GPU computes billions of them per second — and speed is exactly what an attacker
wants. When a password table stored as unsalted SHA-256 leaks, an offline cracking rig
burns through the common-password space almost instantly. The hash being "strong" does not
help; its speed is the vulnerability.
Use a purpose-built password hash: bcrypt, scrypt, or Argon2. These are
deliberately slow and memory-hard, with a tunable work factor, so each guess costs the
attacker real time and money. Always pair them with a unique per-user salt,
which is what defeats precomputed rainbow tables and ensures two users with the same password
get different stored hashes. A plain SHA-256 with a salt is still far too fast — the salt
stops precomputation, but not a targeted GPU attack.
What SHA-256 is genuinely good for
None of this makes SHA-256 a bad hash — it is an excellent one for the jobs it was designed
for, all of which rely on the collision resistance it still has:
- Integrity and checksums — verify a downloaded file matches the
publisher's digest, or detect corruption in storage and transfer.
- Content addressing — Git names every commit and blob by its hash, and
systems like IPFS and content-addressed caches deduplicate by it.
- Building block — SHA-256 is the core of HMAC, of many digital-signature
schemes, and of commitment schemes.
The dividing line is simple: SHA-256 is the right tool when you need a stable fingerprint of
data, and the wrong tool when you need to store a secret that humans chose.
Frequently Asked Questions
Can I reverse or decrypt a hash back to the original text?
No. Hashing is one-way and keyless, so there is nothing to decrypt. The only way to find
the input behind a digest is to hash candidate inputs until one matches — which works
only for guessable inputs like common passwords, not for arbitrary data.
Is MD5 or SHA-1 safe to use anywhere?
Their collision resistance is broken, so never use them where an attacker benefits from
two inputs sharing a hash — digital signatures, certificates, or deduplication keys.
Their preimage resistance still holds, so a legacy MD5 checksum for detecting accidental
corruption is not an immediate emergency, but new designs should use SHA-256.
Can I hash user passwords with SHA-256?
No. SHA-256 is far too fast, which makes offline cracking cheap once a database leaks.
Use bcrypt, scrypt, or Argon2 with a unique per-user salt. Those are intentionally slow
and memory-hard, so each guess costs the attacker meaningful time.
Why do rainbow tables work, and what does a salt do?
A rainbow table is a precomputed map from common inputs to their hashes, so an unsalted
digest can be looked up instantly. A unique random salt mixed into each password means
the attacker would need a separate table per salt, which is infeasible — and it makes
identical passwords hash to different values.
The same input always gives the same hash — is that a weakness?
Determinism is the point: it is what lets you compare and verify. It only becomes a
weakness for passwords, where it enables precomputation — which is exactly why password
hashing adds a per-user salt to break the "same input, same output" property.
What does this tool support, and does it hash files?
It generates MD5 and SHA-256 digests from text input in your browser, so your text stays
on your device. It does not hash uploaded files; for a file checksum use a dedicated
file-hashing tool or your operating system's built-in utility.