← Guides

Developer Guide

MD5 vs SHA-256

MD5 is a 128-bit hash with practical collisions. SHA-256 is a 256-bit SHA-2 digest and the usual integrity default. Neither is a password KDF, and the Hash Generator does not compute MD5.

md5 vs sha256sha-256 versus md5hash algorithm comparisonmd5 collisionssha-1 versus sha-256

A hash digest is a fixed-size fingerprint of some bytes. MD5 and SHA-256 both produce one, and they are not interchangeable. MD5 is 128 bits and collision-broken: two different files can be built to share a digest. SHA-256 is 256 bits, in the SHA-2 family, and is the usual integrity default next to a download.

/tools/hash-generator computes SHA-1, SHA-256, SHA-384, SHA-512, and optional HMAC in the browser. It does not offer MD5. That is deliberate. This page shows the SHA-256 digest the tool emits for hello and keeps MD5 in the legacy-checksum column.

Digest size and what the hex looks like

MD5 is 128 bits: 32 hex characters. SHA-256 is 256 bits: 64 hex characters. SHA-1, which still appears on old manifests, is 160 bits: 40 hex characters, and it is also collision-broken.

Paste hello into /tools/hash-generator and select SHA-256. The digest is 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824. SHA-1 of the same string is aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d. Those two strings are what this site will show you. An MD5 of hello belongs in a history book or a vendor README you do not control, not in this tool.

Collisions: why MD5 and SHA-1 are retired

A collision is two inputs with the same digest. MD5 has practical chosen-prefix collisions. That is enough to make an MD5 checksum a weak way to decide whether software is the software you meant. SHA-1 has practical collisions as well; keep it only when you must match a legacy list (older Git objects, an old mirror).

SHA-256 is the current default for integrity checksums. Matching SHA-256 means the bytes match the bytes that were hashed. It does not, by itself, prove who published the digest — anyone who swapped the file on a page they control can swap the hex line too.

Integrity versus passwords

SHA-256 is fast on purpose. That is a feature for checksums and a defect for password storage. SHA-256(password) is not a password hash even with a salt: GPUs try guesses cheaply. MD5 is worse. Store passwords with Argon2id, bcrypt, or scrypt — a slow key-derivation function — not with either of these digests.

HMAC-SHA-256 on /tools/hash-generator authenticates a message when you already share a secret. It is still not a password KDF. Use it for webhook signatures and internal payloads, not for a users.password column.

What the Hash Generator will and will not do

Choose SHA-1, SHA-256, SHA-384, or SHA-512. Paste text or drop a local file. Toggle uppercase hex if a manifest prints A–F. Enable HMAC and type a secret that stays in the tab. Web Crypto runs in the browser; nothing is uploaded.

There is no MD5 button. If a tutorial tells you to “generate MD5 on thedevtools.in,” it is describing a tool this site does not ship. For a vendor that only publishes MD5, look for a SHA-256 or a signature on a second channel.

When MD5 still shows up

Old mirrors and firmware notes still print MD5 because the pipeline was frozen years ago. Treat those lines as a weak integrity hint. Prefer SHA-256 of the same artifact, or a signed checksum file. Do not add MD5 to a new protocol “for compatibility.” Dual-publishing SHA-256 and SHA-512 is the path that does not reintroduce a broken 128-bit digest.

Common pitfalls

Copying an MD5 into a security checklist. Hashing a password with SHA-256 because the hex looked official. Comparing SHA-1 of an unpacked tree to SHA-256 of the zip. Trusting a checksum that travelled with the file.

This generator cannot confirm an MD5 line. Hash the file as SHA-256 here, and treat an MD5-only vendor as a reason to find another digest.

  • /tools/hash-generator offers SHA-1, SHA-256, SHA-384, SHA-512, and HMAC — not MD5.
  • SHA-256('hello') is 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824.
  • Neither MD5 nor SHA-256 is a password KDF.

Worked examples

SHA-256 of hello (from the Hash Generator)

Input
hello
Output
2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

64 lowercase hex characters. Toggle uppercase on /tools/hash-generator if the manifest uses A–F. This is a checksum, not a password hash.

SHA-1 of hello (legacy, collision-broken)

Input
hello
Output
aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d

40 hex characters. Available on /tools/hash-generator so you can match an old list. Do not publish new SHA-1 checksums.

Frequently asked questions

Why is there no MD5 option on the Hash Generator?

MD5 is collision-broken and too often used as if it were a security digest. /tools/hash-generator omits it on purpose. Use SHA-256.

Is SHA-256 still safe for checksums?

Yes, as an integrity fingerprint of bytes you already trust the publisher of. It does not replace a signature or TLS.

Can I store passwords as SHA-256 if I add a salt?

No. A unique salt is necessary and not sufficient. Use Argon2id, bcrypt, or scrypt. SHA-256 and MD5 are the wrong primitive.

Should I still verify SHA-1 lists?

Only to match a legacy artifact. Prefer a SHA-256 from the same publisher. SHA-1 is collision-broken; do not start a new checksum file with it.

Does hashing a file upload it?

No. Drop the file on /tools/hash-generator. Web Crypto runs locally.

Summary

Use SHA-256 for new checksums, keep SHA-1 for old lists, and treat MD5 as a legacy line you verify somewhere else. Confirm hello on /tools/hash-generator — SHA-256 is 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 — and do not ask this tool for MD5 or for a password KDF.

Try it yourself

Put what you've learned into practice with our free browser-native tool.

Open Tool →