devtools.cihat.dev

MD5 and SHA hash generator

Five hashes of any text or file at once, computed in your browser. Paste a published checksum to confirm a download is intact.

Hash

Type some text and all five hashes appear at once.

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

How to use it

  1. Choose text or a file. Files of any type are read locally; nothing is uploaded.
  2. All five hashes appear together: MD5, SHA-1, SHA-256, SHA-384 and SHA-512.
  3. To verify a download, paste the checksum from its download page. The matching row is marked, or you are told nothing matches.

Which hash to use

A hash turns any input into a short fixed-length fingerprint. Change one byte and the fingerprint changes completely.

  • SHA-256 is the default for checksums, Git’s newer object format, Subresource Integrity and most package managers.
  • MD5 and SHA-1 are broken for security: people can make two different files with the same hash. They are still fine for spotting accidental corruption and matching old checksums.
  • SHA-384 and SHA-512 are longer members of the same SHA-2 family.

Do not hash passwords with this

A fast hash such as MD5 or SHA-256 is the wrong tool for storing passwords: attackers can try billions of guesses per second. Use a slow password hash such as Argon2id, scrypt or bcrypt in your server code.

How the hashes are computed

SHA hashes come from the browser’s Web Crypto API. Web Crypto has no MD5, so MD5 is computed by a small implementation of RFC 1321 in this page’s code. Text is hashed as UTF-8, the encoding echo -n "text" | sha256sum uses on most systems.

Questions people ask

Why does my hash differ from the command line?

Usually a trailing newline. echo adds one unless you use echo -n. Line endings (CRLF or LF) and a different text encoding also change the hash.

Can a hash be decrypted?

No. A hash cannot be reversed. Sites that “decrypt” MD5 only look the hash up in lists of common words they have already hashed.

Is my file uploaded?

No. The file is read and hashed in your browser.

How big a file can it hash?

The whole file is read into memory, so the limit depends on your device and browser. If a file is too large, the tool says so instead of showing a wrong hash.