Security

MD5 / SHA Hash Generator

Compute MD5, SHA-1, SHA-256 and SHA-512 hashes from any text. Useful for integrity checks, file comparison and checksums.

What a hash function is

A hash function takes input of any size and returns a fixed-size string. The same input always produces the same output. Changing a single bit drastically changes the result (the avalanche effect). That makes them useful as fingerprints: if two hashes match, the data is the same.

Cryptographic hash functions also resist inversion: given a hash, deducing the input is computationally impossible. And collisions: finding two distinct inputs that produce the same hash is very hard... when the function isn't broken.

MD5, SHA-1, SHA-256 and SHA-512

  • MD5 (1991, 128 bits). Broken since 2004 for collision resistance. Useful only for non-adversarial checksums.
  • SHA-1 (1995, 160 bits). Broken in 2017 (the SHAttered attack). Google and Microsoft removed it from TLS. Don't use it for signatures.
  • SHA-256 (2001, 256 bits). Part of the SHA-2 family. Still secure and the current standard for TLS, Bitcoin, Git since 2018, SSL certificates and digital signatures.
  • SHA-512 (2001, 512 bits). Same family as SHA-256 but with 1024-bit blocks. Faster on 64-bit hardware and useful when you need a larger output.

Correct use cases

  1. Verifying downloads. When a site publishes the SHA-256 of an installer, you can compute it locally and compare.
  2. File integrity. Detect corruption in transfers, backups and disks.
  3. Indexing and deduplication. Stores like S3 or Git use hashes to identify identical content without comparing bytes.
  4. Proof of existence. Publishing the hash of a document acts as a cryptographic timestamp.
  5. Derived identifiers. A deterministic hash creates a stable ID from input fields.

When NOT to use these hashes

These functions are fast. Good for verification, terrible for passwords: an attacker can try billions per second. For passwords, use slow, salted functions:

  • bcrypt: the historical standard, configurable cost factor. Use Genfy's bcrypt generator.
  • argon2id: winner of the Password Hashing Competition (2015). GPU/ASIC resistant.
  • scrypt: also resistant to specialized hardware.

Don't use MD5 or SHA-1 for anything that requires collision resistance (signatures, certificates, adversarial integrity). For all of that, SHA-256 minimum.

How hashes are computed here

SHA-1, SHA-256 and SHA-512 use the browser's Web Crypto API (crypto.subtle.digest) — a standard, native, fast implementation. MD5 isn't in Web Crypto (precisely because it's deprecated for crypto), so it's computed in pure JavaScript. Everything happens locally; nothing is sent.

Practical example: verifying an installer

When you download Node.js or Python from the official site, the SHA-256 usually appears next to the link. The right process:

  1. Get the file from the official site (not an unknown mirror).
  2. Open a terminal and run shasum -a 256 file.dmg (Mac/Linux) or certutil -hashfile file.exe SHA256 (Windows).
  3. Compare the result with the published value. If they match, the file wasn't tampered with.

For short text snippets, this generator works. For large files, the command-line tool is more convenient.

FAQ

What is a hash?

A fixed-size fingerprint of any data. Used to verify integrity, index content and detect duplicates.

Is MD5 still safe?

Not for crypto. MD5 and SHA-1 are broken for collision resistance. They work for non-critical checksums.

Which one for passwords?

None of these. Use bcrypt, argon2id or scrypt. Fast hashes like SHA-256 crack too quickly applied to passwords.

Is my text sent to a server?

No. Everything is computed with Web Crypto API in your browser. Nothing leaves your device.