Tools › Developer › Hash generator

Hash generator

SHA-256, SHA-384, SHA-512 and MD5 of text or a file, computed in your browser, so you can check a download without handing the file to anybody.

  • Hash a file by dropping it in: nothing is uploaded, so there is no size limit
  • Paste an expected checksum and it says match or not, rather than making you compare 64 characters by eye
  • SHA-256, SHA-384 and SHA-512 from the browser's own crypto implementation
  • MD5 included, and labelled as what it is: a checksum, not a security measure
e3b0c44298fc1c14 9afbf4c8996fb924
Any size in, the same length out, every time.

MD5 is not offered. Browsers do not implement it, and it has been unsafe for anything security-related for twenty years, shipping a hand-written one would present a broken hash as though it were a choice.

What a hash is for

A hash turns any amount of data into a fixed-length string, such that the same input always gives the same string and any change at all gives a completely different one. It is how you check that a file arrived intact, that a download is the one the publisher built, and that a backup is identical to its original.

It is a one-way trip. You cannot get the file back from the hash, which is exactly why it is safe to publish one.

Checking a download

The reason this page hashes files locally. A project publishes the SHA-256 of its installer; you drop the file in here, paste their checksum, and get a yes or a no. Doing that on a site that uploads the file is both slow and self-defeating: you have just sent a large binary to a stranger to confirm it is trustworthy.

Comparing sixty-four hex characters by eye is also how mismatches get missed. A single changed character in the middle is invisible to a human and obvious to a comparison.

Which algorithm

SHA-256 is the default and the right answer almost always. SHA-384 and SHA-512 are stronger in the sense of being longer; for checking a file they offer nothing SHA-256 does not, and they are faster on 64-bit machines, which is occasionally a reason.

MD5 is here because publishers still print it, and it is still perfectly good at catching a corrupted download. It is not good at catching a deliberately altered one: producing two different files with the same MD5 is cheap and has been for years. If the question is "did this transfer correctly", MD5 answers it. If the question is "is this the file they built", it does not.

Hashing is not encrypting, and not password storage

A hash cannot be reversed, but it can be guessed at: hash every common password and compare. That is why passwords are stored with a slow, salted function like bcrypt or Argon2 rather than SHA-256, which is designed to be fast and is therefore the wrong tool entirely. Nothing on this page should be used to store a password.

Questions

Is my file uploaded?

No. It is read in this tab in chunks and hashed there. That is the whole point: you can check a download without sending it to anyone.

Is there a file size limit?

No. The file is read a piece at a time rather than held whole, so size is a matter of patience rather than memory.

Which algorithm should I use?

SHA-256 unless something tells you otherwise. Use MD5 only to match a published MD5.

Is MD5 safe?

For detecting accidental corruption, yes. For detecting deliberate tampering, no. Two different files with the same MD5 can be made cheaply.

Can I get the original back from a hash?

No. It is one-way, which is why publishing a hash is safe.

Can I use this to hash passwords?

No. Passwords need a deliberately slow, salted function such as bcrypt or Argon2. A fast hash is the wrong tool.

Why does the same file give a different hash elsewhere?

Almost always a different algorithm, or a file that differs by line endings. Check you are comparing the same algorithm first.

Next