Hash Generator (SHA-256)

A hash is a fixed-length fingerprint of data: the same input always gives the same hash, and any change gives a completely different one. Type text or choose a file below to get its SHA-256, SHA-1, SHA-384 and SHA-512 hashes.

Reviewed by ToolNook editorial team Updated Sources

Hash
Output

SHA-256

–

SHA-1 (legacy, not for security)

–

SHA-384

–

SHA-512

–

What is a hash?

A cryptographic hash function turns any input, a word, a document or a 4 GB video, into a short fixed-length fingerprint called a digest. The same input always gives the same digest, but changing even one character produces a completely different one, and it is practically impossible to work backwards from the digest to the input.

Hashes are used to verify downloads (compare the checksum a publisher lists with the hash of the file you received), detect changed files, sign software and documents, store passwords (with special slow algorithms), build blockchains and deduplicate data.

How to use the hash generator

  1. Choose Text and type or paste your input, or choose File and drop a file onto the box.
  2. All four hashes are calculated instantly. Text is hashed as UTF-8 bytes.
  3. Switch between hex and Base64 output, and uppercase if you need it.
  4. Copy the digest and compare it with the published checksum.

Which algorithm should I use?

AlgorithmDigest sizeUse
SHA-256256 bits (64 hex characters)The modern default for checksums, signatures and integrity checks.
SHA-384 / SHA-512384 / 512 bitsLarger margins of security; SHA-512 is often faster on 64-bit machines.
SHA-1160 bits (40 hex characters)Legacy only. Practical collisions exist, so do not rely on it for security.

MD5 is not offered because it is broken for security purposes and is not part of the Web Crypto standard. For storing passwords, never use a plain hash: use a slow, salted algorithm such as Argon2, scrypt or bcrypt.

Example

The SHA-256 hash of the three letters abc is:

ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad

This is one of the official test vectors published with the SHA-2 standard, so you can use it to confirm that the tool is working correctly. Change the input to abd and the digest changes completely.

More worked examples

Verify a download: if a publisher lists a SHA-256 checksum for an installer, hash the downloaded file here and compare all 64 characters. Any difference means the file is not the one published.

Common mistakes to avoid

  • Hashing passwords with plain SHA-256. Use slow, salted algorithms such as Argon2 or bcrypt for passwords.
  • Comparing only a few characters. Check the whole digest.
  • Ignoring hidden differences. A trailing newline changes the hash. To encode data instead, use Base64.

Sources and methodology

The calculations on this page follow these published standards and references. The code is covered by automated tests against known values.

Frequently asked questions

Are my files uploaded to calculate the hash?

No. Files are read and hashed in your browser's memory using the Web Crypto API. Nothing is sent to a server.

Can a hash be decrypted?

No. Hashing is one-way. Short or common inputs can sometimes be found by guessing, which is why passwords need salted, slow algorithms.

Why does my hash differ from another tool's?

Check for invisible differences: a trailing newline, different line endings (CRLF vs LF), extra spaces, or text encoded as something other than UTF-8.

How large a file can I hash?

Files up to 500 MB are supported. Very large files depend on how much memory your device has available.