Hash generator

Generate SHA-256, SHA-384 or SHA-512 hashes for text and files.

The interactive form is ready when JavaScript is enabled.

How to use

Type or paste text, or choose a file, pick SHA-256, SHA-384 or SHA-512 and press Generate hash; the browser computes the digest with its built-in Web Crypto API. When a file is chosen, the file is hashed rather than the text. Files up to 200 MB are read on your own device; nothing is uploaded.

The result is a fixed-length string of hexadecimal characters: 64 for SHA-256, 96 for SHA-384 and 128 for SHA-512, whatever the size of the input. The same input always gives the same digest, and changing a single character or byte produces a completely different one.

The usual reason to want one is to check a download: compare the digest here with the checksum the publisher lists, using the same algorithm. If they match, the file is the one the publisher hashed. A checksum published on the same page as the file only protects against damage in transit, not against a compromised site; a signed checksum or one from a separate source does more.

Text is hashed as UTF-8 exactly as typed, including spaces and line breaks, so a trailing space or a different line ending changes the result. That is the most common reason a digest calculated here differs from one made in a terminal.

Example

SHA-256 turns “nTools” into a 64-digit hexadecimal fingerprint. Identical input gives the same fingerprint; a change alters it.

  • nTools · SHA-256c3c211099e2db0d1bb97343886c2b7e23981b636107a296a9fe642b99ca4cc1b
  • nTools. · SHA-256f3d5d7effbcbc469b624c3e5794580ab4eed1b42736c7b9279f8f62da1267d24: one extra full stop, an unrelated digest.
  • Empty text · SHA-256e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855, the well-known digest of nothing.
  • A downloaded ISO file · SHA-256Compare the 64 characters with the checksum on the publisher’s site.

Frequently asked questions

Why is there no MD5 or SHA-1?

Both are broken for anything security-related: two different files can be made to share a digest. They survive as legacy checksums, and the browser Web Crypto API does not offer MD5 at all.

Can the original text be recovered from a hash?

No, a hash is one-way by design. What an attacker can do is hash guesses until one matches, which is why a bare hash is not a safe way to store passwords; password storage needs a slow, salted algorithm such as Argon2 or bcrypt.

Why does my terminal give a different hash for the same text?

Usually because of a hidden line break: echo adds one at the end. Hash the exact same bytes, for example with echo -n, and the digests match.

Is the file uploaded to compute the hash?

No. The file is read and hashed in your browser; only the digest is shown.

Related tools