If you've ever verified a download or stored a checksum, you've used a hash function. The two names that come up most are MD5 and SHA-256 β€” but they're not interchangeable. One is considered broken; the other is the modern standard. Here's the difference and how to choose.

What a hash function does

A hash takes any input β€” a word, a file, a password β€” and produces a fixed-length fingerprint. The same input always yields the same hash, but you can't reverse the hash back to the input, and even a one-character change produces a completely different result. That makes hashes ideal for integrity checks, checksums and comparing values without storing the original.

Why MD5 is no longer safe

MD5 produces a 128-bit hash and is very fast β€” but that speed is now a weakness. Researchers can deliberately create two different inputs with the same MD5 hash (a "collision"), which means it can no longer guarantee that data hasn't been tampered with. MD5 is fine for a quick non-security checksum, but never use it for signatures, certificates or anything an attacker might try to forge.

SHA-256 and the SHA-2 family

SHA-256 produces a 256-bit hash and has no known practical collision attacks, which is why it's the default for software signing, TLS certificates and blockchains. SHA-512 is its larger sibling (512-bit) and can be faster on 64-bit hardware. For almost any integrity or checksum need today, SHA-256 is the right choice β€” and you can generate all of them from any text with the hash generator.

What about hashing passwords?

Here's the catch: none of MD5, SHA-256 or SHA-512 are suitable for storing passwords on their own, precisely because they're fast β€” an attacker can try billions of guesses per second. For passwords, use a deliberately slow, salted algorithm like bcrypt, scrypt or Argon2. If you just need strong random secrets rather than to hash one, the password generator and UUID generator are better tools. See them all on the developer tools page.