Hash Generator

Generate MD5, SHA-1, SHA-256, and SHA-512 hashes in your browser. Text never leaves this page.

Enter text to hash


A hash generator computes a fixed-length fingerprint of text. Type or paste text above and the MD5, SHA-1, SHA-256 and SHA-512 hashes update as you type, as lowercase hexadecimal. Text is hashed as UTF-8 in your browser (SHA via the Web Crypto API, MD5 via a small local script) and is never sent to PagesTest.

Which hash algorithm should I use?

AlgorithmOutputStatus
MD5128 bits, 32 hex charactersBroken: collisions can be produced deliberately. Fine for non-security checksums and cache keys.
SHA-1160 bits, 40 hex charactersDeprecated for security since practical collisions were shown in 2017. Still seen in Git and older systems.
SHA-256256 bits, 64 hex charactersThe current default for checksums, signatures and integrity checks.
SHA-512512 bits, 128 hex charactersSame family as SHA-256 with a longer output; often faster on 64-bit machines.

For reference, the SHA-256 hash of abc is ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad.

Why doesn't my hash match?

  • A trailing newline. echo abc | sha256sum hashes abc plus a line break. Use printf '%s' 'abc' | sha256sum (Linux) or printf '%s' 'abc' | shasum -a 256 (macOS) to compare with this tool.
  • Different text encoding. This tool hashes UTF-8. Text saved as UTF-16 (common on Windows) has different bytes and so a different hash.
  • Hidden whitespace. A space or line break copied along with the text changes the hash completely.
  • Hashing a file. This tool hashes text you type. To check a downloaded file, hash the file itself, e.g. sha256sum file.iso, or Get-FileHash file.iso in PowerShell.

Upper- or lower-case hex makes no difference: BA78… and ba78… are the same hash.

Hashes are not for storing passwords

MD5 and SHA hashes are designed to be fast, which makes guessing passwords against them fast too. Store passwords with a slow, salted password-hashing function such as Argon2, bcrypt or scrypt. To create a strong password, use the Password Generator.

Frequently asked questions

Can a hash be decrypted?

No. Hashing is one-way. Sites that claim to "decrypt MD5" look the hash up in a table of hashes of common strings; that only works for short or common input.

Is MD5 still safe to use?

Not for anything an attacker might target, such as signatures, certificates or passwords. It is still acceptable for detecting accidental changes, like comparing two copies of a file.

Is the text I enter sent anywhere?

No. All four hashes are computed in your browser, and the text stays on your device.

Why do two almost identical inputs have completely different hashes?

That is a design goal of cryptographic hashes, called the avalanche effect: changing a single character changes, on average, half the bits of the output.