Skip to content

MD5 and SHA hash generator

MD5, SHA-1, SHA-256 and SHA-512 hashes of any text, updated as you type. Paste a hash to check whether it matches.

  • MD5
  • SHA-1
  • SHA-256
  • SHA-384
  • SHA-512

Text is hashed as UTF-8. Line endings and trailing spaces count.

How it works

Hash functions in practice

A cryptographic hash function turns any input into a short, fixed-size value. Change one letter and the result is completely different, which makes hashes ideal for spotting changes:

  • Download checks: compare a file's SHA-256 (or, on older sites, MD5) with the one the publisher lists.
  • Caching and deduplication: identical content gives an identical hash.
  • Signatures and certificates: the data is hashed, then the hash is signed.
  • Git identifies every commit and file by its hash.

Hash lengths

AlgorithmBitsHex charactersStatus
MD512832Broken for security use; fine for checksums
SHA-116040Broken for security use
SHA-25625664Recommended
SHA-38438496Secure
SHA-512512128Secure

Two hashes that differ tell you the inputs differ, but not where. To see the exact lines or words that changed, compare the two texts in the diff checker.

Not sure whether you need a hash, encryption or just encoding? See hashing vs encryption vs encoding.

Frequently asked questions

What is a hash?

A hash is a fixed-length fingerprint of data. The same input always gives the same hash, the smallest change gives a completely different one, and you can't work backwards from the hash to the input. Hashes are used to check file integrity, compare data and build digital signatures.

Which algorithm should I use?

SHA-256 is the standard choice for most purposes today. SHA-384 and SHA-512 are longer variants from the same SHA-2 family. MD5 and SHA-1 are broken for security uses and are here for checksums and compatibility with older systems.

Is MD5 safe?

For checksums, yes: MD5 still reliably shows whether a file or text has changed by accident, such as a broken download. For security, no: it is practical to create two different inputs with the same MD5 hash, so it must not be used for passwords, digital signatures or certificates. Use SHA-256 there, and a password hashing function for passwords.

Can I use SHA-256 to store passwords?

No. Plain SHA hashes are designed to be fast, which makes them fast to brute-force. Passwords should be stored with a slow, salted password hashing function such as Argon2, scrypt or bcrypt.

How do I check a hash?

Paste the text, then paste the hash you expect into "Compare with". The result says whether it matches one of the hashes, ignoring upper and lower case and spaces around it. A line from a checksum file, with the file name after the hash, works too.

Is my text sent anywhere?

No. Hashes are computed on your device: the SHA hashes by your browser's Web Crypto API, MD5 by a small script in this page. The text never leaves the page.