Hash Generator

SHA-1, SHA-256, SHA-384 and SHA-512 of text or a file.

SHA-256
-
SHA-1
-
SHA-384
-
SHA-512
-

Hashes are one-way fingerprints, not encryption. SHA-1 is shown for compatibility but is no longer considered safe for security uses.

About this tool

A hash is a short fixed-length fingerprint of some data. The same input always gives the same hash, and even a one-character change gives a completely different one, which makes hashes useful for checking that a download or a message has not changed. This tool computes SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text you type or any file you choose, using the Web Crypto API that is built into your browser, so nothing is uploaded and large files are read locally. The SHA-256 value is shown first with the others beneath it, and a single button copies all of them. Hashes are one-way: you cannot recover the input from the output, and a hash is not encryption. SHA-1 is included for compatibility with older systems, but it is no longer considered safe for security purposes, so prefer SHA-256 or stronger. The Web Crypto API needs a secure page, which this site provides.

How to use it

  1. Type or paste text, or choose a file.
  2. Read the SHA-256 value at the top of the result.
  3. Look at the SHA-1, SHA-384 and SHA-512 values below it.
  4. Compare a hash with the one published by the file's author to check a download.
  5. Copy all hashes with the copy icon.

How it works

Text is converted to bytes with UTF-8 and passed to crypto.subtle.digest with the chosen algorithm. The result is shown as lowercase hexadecimal: 40 characters for SHA-1, 64 for SHA-256, 96 for SHA-384 and 128 for SHA-512.

Example: The text abc has the SHA-256 hash ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad and the SHA-1 hash a9993e364706816aba3e25717850c26c9cd0d89d, which match the published test vectors for those algorithms.

Common uses

  • Checking that a downloaded file matches the checksum on the publisher's page.
  • Comparing two files to see whether they are identical.
  • Producing a fingerprint of a piece of text for a test or a log.

Frequently asked questions

Is a hash the same as encryption?
No. Encryption can be reversed with a key. A hash is one-way and cannot be turned back into the original data.
Should I hash passwords with this?
No. Storing passwords needs slow, salted algorithms such as bcrypt or Argon2, not a plain SHA hash.
Why is there no MD5?
The browser's Web Crypto API does not provide MD5, and MD5 is broken for security use. Use SHA-256 or stronger.
Is my file uploaded?
No. The file is read and hashed in your browser.
Why do two hashes differ for what looks like the same text?
Even an extra space, a different line ending or a different character encoding changes the hash completely.

Last reviewed 2026-11-01. Browse all tools