tooly

Hash generator

Calculate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 digests of any text or file. Hashes update as you type. Files are hashed locally, so you can verify large downloads privately.

Everything runs in your browser — nothing is sent anywhere

How to use

  1. 1

    Type or paste text, or choose a file.

  2. 2

    All five hashes are calculated instantly.

  3. 3

    Copy the hash you need.

What a hash is good for

A cryptographic hash function turns input of any size into a fixed-length fingerprint. The same input always produces the same digest, and changing a single bit of the input produces a completely different one. You cannot reconstruct the input from the digest, and for modern algorithms you cannot find two inputs with the same digest in practice.

That makes hashes useful whenever you need to know whether two things are identical without comparing them byte by byte:

  • Verifying downloads. Linux ISOs, firmware images and many installers publish a SHA-256 next to the download link. If your file gives the same value, it arrived intact.
  • Spotting duplicates. Two photos or documents with the same SHA-256 are the same file, whatever their names.
  • Cache keys and ETags. Web servers and build tools hash content to tell whether it changed.
  • Integrity in APIs. Webhooks, package lock files and Subresource Integrity attributes all rely on digests.
  • Debugging. Comparing the hash your code computes with a reference value quickly shows whether the bug is in the hashing or in the input.

The five algorithms side by side

The tool computes all five at once, so you can match whatever format a site publishes.

  • MD5, 128 bits, 32 hex characters. Designed in 1991. Practical collisions have been possible since 2004, so it must not be used where an attacker could craft input. Still common for quick duplicate checks and legacy checksums.
  • SHA-1, 160 bits, 40 hex characters. Deprecated after the first public collision in 2017. Git historically identified objects by SHA-1, which is why it is still everywhere.
  • SHA-256, 256 bits, 64 hex characters. The current default for checksums, certificates, package managers and blockchains.
  • SHA-384, 384 bits, 96 hex characters. A truncated variant of SHA-512, often used in TLS and in Subresource Integrity hashes.
  • SHA-512, 512 bits, 128 hex characters. Same family as SHA-256 but with 64-bit internal operations, which can make it faster than SHA-256 on 64-bit processors.

If you have a choice, publish and check SHA-256. MD5 and SHA-1 are acceptable only for detecting accidental corruption, not tampering.

Getting a matching hash for text

When your digest differs from someone else's for the "same" text, the input is almost never really the same. Things to check:

  • Trailing newline. echo hello | sha256sum hashes hello followed by a line feed. The text box here hashes exactly what you typed, so the results differ unless you add a new line at the end. On the command line, echo -n or printf avoids the extra character.
  • Line endings. Windows uses CR LF, Linux and macOS use LF. A pasted multi-line text can change endings depending on where it came from.
  • Encoding. Text is converted to UTF-8 before hashing. A system that hashes Latin-1 or UTF-16 bytes will get a different result for anything beyond plain ASCII.
  • Invisible characters. Non-breaking spaces and zero-width characters copied from web pages or PDFs look identical on screen.
  • Hex case. Digests are shown in lowercase. A3F… and a3f… are the same value; compare them case-insensitively.

Hashing files and verifying checksums

Hash a file… reads the chosen file locally and computes all five digests from its exact bytes. The file name and date do not affect the result, only the content does. The SHA family uses the browser's built-in Web Crypto implementation; MD5 is computed by a small JavaScript library because browsers do not provide it.

To verify a download, open the publisher's checksum page, find the line for your file and compare it with the matching row here. Comparing the first and last six or eight characters is a quick sanity check; for real security, compare the whole string. If the values differ, download the file again before assuming tampering, as an interrupted download is the most likely reason.

The whole file is loaded into memory before hashing, so very large files, especially several gigabytes on a phone, may be slow or fail. Nothing is uploaded.

What hashes are not

A plain hash is not a way to store passwords. MD5 and the SHA family are designed to be fast, which lets attackers test billions of guesses per second against a leaked digest. Password storage needs a deliberately slow function with a salt, such as bcrypt, scrypt or Argon2. If you simply need a strong secret, use the password generator.

A hash is also not encryption. It is one-way: there is no key to get the original back.

FAQ

Is my file uploaded?

No. Hashing uses the Web Crypto API in your browser. The file never leaves your device.

Which hash should I use?

SHA-256 for checksums and integrity today. MD5 and SHA-1 are fine for detecting accidental corruption but are not secure against tampering.

Can I verify a downloaded file?

Yes. Choose the file, then compare the SHA-256 with the value published by the download page.

Is there a file size limit?

There is no fixed limit, but the whole file is read into memory before hashing, so multi-gigabyte files may fail on devices with little memory, especially phones. Nothing is uploaded.

Related tools