Hash generator

Your input is processed only in this browser. See the privacy policy.

How to use it

  1. Type or paste text on the Text tab. For a file, drop it on the File box or anywhere in the left panel.
  2. To verify a download, paste the vendor’s hash into Verify against an expected hash. The algorithm is detected from the length and the result shows a large Match or No match, with the first differing character marked. Paste a whole SHA256SUMS list and the line with your file name is picked.
  3. Press Copy next to a hash, or Copy all. Switch between lowercase and uppercase or Hex and Base64 to match the other side, and open HMAC key when you need an API signature.

Examples

The classic test string

Text input of three letters. These values appear in the official MD5 and SHA test vectors, so you can use them to check the tool itself.

Input
abc
Result
MD5     900150983cd24fb0d6963f7d28e17f72
SHA-1   a9993e364706816aba3e25717850c26c9cd0d89d
SHA-256 ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad

Verifying a downloaded file

Drop the downloaded file on the File tab, paste the SHA-256 value from the download page into the verify box, and the large Match or No match tells you at once. A match means the file is byte for byte what the publisher hashed. A mismatch means the download is incomplete, damaged or different.

Checking a webhook signature (HMAC-SHA-256)

This is the RFC 4231 test case. Enter Jefe as the HMAC key and paste the body below as text; the SHA-256 row shows this value. Pasting it into the verify box with a sha256= prefix still counts as a match.

Input
what do ya want for nothing?
Result
HMAC-SHA-256 5bdcc146bf60754e6a042426089575c75a003f089d2739839dec58b964ec3843

Details

A hash function turns any input into a short fixed-length fingerprint. The same input always gives the same fingerprint, and a tiny change in the input changes the fingerprint completely. That makes hashes useful for checking that a file arrived intact and for spotting accidental changes in text.

This page computes five common hashes. MD5 and SHA-1 are still widely published next to downloads, but practical collision attacks exist for both, so do not rely on them where someone might forge a file on purpose. SHA-256, SHA-384 and SHA-512 belong to the SHA-2 family and are the better choice for integrity checks today.

Text is converted to UTF-8 bytes before hashing, so the same characters always give the same result regardless of your operating system. Line endings count as characters: a text that ends with a newline has a different hash from the same text without one, which is the usual reason this tool disagrees with a command such as echo piped into sha256sum.

Frequently asked questions

Does the file I choose get uploaded?

The tool reads the file inside your browser and does not send the file or the resulting hashes to a server. This page also carries no ads or analytics code, so nothing else on the page can read what you enter.

Why is my hash different from the one my terminal prints?

Most often it is a trailing newline. echo abc | sha256sum hashes four bytes (abc plus a newline), while typing abc here hashes three.

Is MD5 safe to use?

MD5 is fine for catching accidental corruption, such as a broken download. It is not safe against someone who wants to forge a file, because collisions can be produced deliberately.

Can I recover the original text from a hash?

No. A hash discards information on purpose.

How large a file can it handle?

There is no size limit. Files over 64 MB (8 MB for MD5 or HMAC) are read once, in pieces, on a background thread while every selected hash is updated together, so memory stays low and the page stays responsive. Progress, speed and time left are shown and you can cancel at any time.

Can I paste a whole SHA256SUMS file?

Yes. It reads the hash filename format of sha256sum, the SHA256 (file) = hash tag format and PowerShell Get-FileHash output. The line whose name matches your file is compared; without names, any line that matches counts. You can also drop a .sha256 checksum file on the verify box.

When would I use HMAC?

To check that a webhook or API request really came from the sender. Put the shared secret in HMAC key, paste the request body as text, then paste the sha256=… signature header into the verify box. The RFC 4231 example (key Jefe, body what do ya want for nothing?) gives an HMAC-SHA-256 starting with 5bdcc146bf60754e.