Hash Generator

Online Hash Generator

A hash function turns any input into a fixed-length string, deterministically — the same input always produces the same hash, and changing even one character produces a completely different one. This tool computes MD5, SHA-1, SHA-256, and SHA-512 as you type, entirely in your browser.

Features:

  • Four algorithms at once: MD5, SHA-1, SHA-256, SHA-512 computed together.
  • Live: Hashes update as you type, no button to click.
  • Client-side only: Uses the browser's native Web Crypto API for SHA; nothing is uploaded.

1. What Hashing Is Actually For

File integrity: compare a published SHA-256 checksum against a downloaded file to confirm it wasn't corrupted or tampered with.
Data fingerprinting: use a hash as a compact, comparable stand-in for a larger piece of data (detecting duplicate files, cache keys).
Git and version control: Git identifies every commit and object by its SHA-1 (moving to SHA-256) hash.

2. What Hashing Is Not For

Never hash passwords with MD5, SHA-1, or SHA-256 directly for storage — these are fast, general-purpose hashes, and fast is exactly the wrong property for password storage, since it makes brute-force cracking cheap. Password storage needs a slow, salted algorithm built for it: bcrypt, scrypt, or Argon2.

3. MD5 and SHA-1 Are Broken for Security

Both MD5 and SHA-1 have known collision attacks — two different inputs can be crafted to produce the same hash. Neither should be used for digital signatures or certificate validation anymore. They're still fine for non-adversarial uses like checking accidental file corruption.

Is MD5 safe to use? Not for security purposes. MD5 is broken for password storage and digital signatures — collisions can be engineered deliberately. It is still fine for non-security uses like checking a file transferred correctly.
Which hash should I use for passwords? None of these. Password storage needs a slow, salted algorithm designed for it (bcrypt, scrypt, or Argon2), not a fast general-purpose hash like MD5 or SHA-256.
Why do I get a different hash for the same text? Usually invisible differences: a trailing space, a different line-ending (\r\n vs \n), or different text encoding. Hashing is exact — a single-byte difference produces a completely different result.

Use SHA-256 or SHA-512 for anything security-adjacent.

100% client-side — your text is never sent anywhere.

Related Tools