Calcist

Style

Buttons

Spacing

How much to show

Decimal places

Text size

Hash calculator

Get the MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hash of any text or file, and check it against an expected checksum. It all runs on your device.

Private: calculated on your device. Nothing you type is sent anywhere.

Next: Need a strong random password instead? Use the password generator, which also runs only on your device.

What a hash is

A hash function turns any amount of data into a short, fixed-length fingerprint. The same input always gives the same hash, and changing even one character gives a completely different one. That makes hashes useful for checking that a download or file hasn't changed.

MD5 → 128 bits (32 hex characters) · SHA-1 → 160 bits (40)
SHA-256 → 256 bits (64) · SHA-384 → 384 bits (96) · SHA-512 → 512 bits (128)

The SHA hashes are computed by your browser's built-in Web Crypto API, which implements the NIST FIPS 180-4 standard. Browsers don't include MD5, so it uses a small JavaScript version of RFC 1321, checked against the RFC's test values. Text is converted to bytes as UTF-8 first, so "é" is hashed as two bytes.

Worked example: the standard test string "abc"

AlgorithmBitsHash of "abc"
MD5128900150983cd24fb0d6963f7d28e17f72
SHA-1160a9993e364706816aba3e25717850c26c9cd0d89d
SHA-256256ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad

The MD5 value is listed in RFC 1321's test suite, and Python's hashlib gives the same values for all of them. Type abc above and you'll get the same results. Add a single space and every hash changes.

Which hash to use

  • SHA-256 is the usual choice for checking downloads and for anything security-related.
  • MD5 and SHA-1 are still fine for spotting accidental corruption, but they're broken for security: people can deliberately make two different files with the same hash. RFC 6151 says MD5 is no longer acceptable where collision resistance is required.
  • Passwords shouldn't be stored as a plain hash of any kind. Use a slow, salted password hash like bcrypt, scrypt or Argon2.

Why your hash might not match

  • A trailing newline. echo "abc" | sha256sum hashes "abc" plus a newline, so it won't match. Use echo -n or printf.
  • Line endings. Windows files often use CRLF line endings; text typed here uses LF. Hash the file itself to avoid this.
  • Encoding and spaces. Hidden spaces, tabs or a different text encoding change the bytes, and so the hash.
  • Case. Hex hashes are the same in upper or lower case. The compare box ignores case.

Sources

How we checked this

Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:

  • MD5("abc") = 900150983cd24fb0d6963f7d28e17f72 (RFC 1321) ✓
  • SHA-1("abc") = a9993e36…c9cd0d89d ✓
  • SHA-256("abc") = ba7816bf…f20015ad ✓
  • SHA-512("abc") = ddaf35a1…a54ca49f ✓
  • MD5 of the quick brown fox sentence = 9e107d9d…42a419d6 ✓
  • Edge: the empty string, MD5 = d41d8cd98f00b204e9800998ecf8427e ✓
  • Edge: "é" is hashed as its 2 UTF-8 bytes, MD5 = 66ddcd97…9b4bc76f ✓
  • A pasted SHA-256 is matched, in capitals too ✓

Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.

Add this calculator to your website (free)

Paste this code into any web page. The calculator works on your page, resizes itself, has no ads and no tracking cookies, and nothing your visitors type is sent anywhere. More about embedding.

Questions people ask

Is it safe to hash files here?

Yes. Everything runs in your browser. The text or file is never uploaded; you can disconnect from the internet after the page loads and it still works.

Can a hash be reversed to get the original text?

Not directly; hashes are one-way. But short or common inputs, like simple passwords, can be found by trying guesses, which is why plain hashes aren't safe for storing passwords.

What is the MD5 hash of an empty string?

d41d8cd98f00b204e9800998ecf8427e. The SHA-256 of an empty string is e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.

How do I verify a download with SHA-256?

Choose the file above, then paste the SHA-256 value from the download page into the Expected hash box. If it says Match, the file is exactly what was published.

Is SHA-256 better than MD5?

For security, yes. MD5 collisions can be created on purpose, and SHA-1 is also considered broken. SHA-256 has no known practical attacks.

Related calculators