cv.cm
All lessons

Text

How to get the MD5 or SHA-256 hash of text or a file

You downloaded a file and the site lists a SHA-256 checksum, or you need the MD5 of a string for a config. You will hash the text or file in this tab and compare the digest. The SHA-256 of an empty string starts e3b0c442. Nothing leaves this tab.

6-minute read

Today's result The digest in hex and Base64 for the chosen algorithm, for text as you type or for a local file.

Open the hash generator with the expected checksum at hand. Use SHA-256 to verify downloads; MD5 and SHA-1 only when the other side requires them. Nothing is uploaded.

Open Hash generator
Contents
  1. Pick the algorithm the other side uses

    A checksum must be compared with the same algorithm. Download pages usually give SHA-256 (64 hex characters); older ones give MD5 (32) or SHA-1 (40). SHA-384 and SHA-512 are longer. MD5 and SHA-1 are fine for integrity checks but not for security.

    Same algorithm on both sides: SHA-256 gives 64 hex characters, MD5 32, SHA-1 40.
    Same algorithm on both sides: SHA-256 gives 64 hex characters, MD5 32, SHA-1 40.
  2. Open Hash generator on cv.cm

    SHA-256 is selected and the text box is empty. Nothing is uploaded.

    Open Hash generator
  3. Hash text

    Type or paste the text. The hex digest updates as you type, and Base64 sits below it. Trailing spaces and line breaks change the hash, so paste exactly.

  4. Hash a file

    Press Hash a file and pick the download. The file is read in this tab and the digest appears with the file name; large files take a few seconds.

  5. Compare with the published checksum

    Read the digest against the published checksum: compare the first and last eight characters, then the whole string if they match. Any difference means the file is not the one published: download it again.

    Compare the digest with the published checksum; one different character means a different file.
    Compare the digest with the published checksum; one different character means a different file.
  6. Copy the digest

    Copy hex puts the digest on the clipboard in lower case. Hashes are case-insensitive in hex, so ABCD and abcd match.

FAQ

Can I hash a file free online without uploading it?

Yes. cv.cm reads the file in this tab with Web Crypto. Nothing is uploaded.

Which algorithms are available?

MD5, SHA-1, SHA-256, SHA-384 and SHA-512, in hex and Base64.

Why does my hash not match?

A different algorithm, an extra space or line break, or a different file. Check the algorithm first.

Is MD5 safe?

For checking a download against a listed checksum, yes. For passwords or signatures, no; use SHA-256 or better.

Can I verify a password hash here?

Only plain digests. Salted hashes such as bcrypt need their own tools.