Definition

What is SHA-256 (hash function)?

Also known as: SHA-2, cryptographic hash.

Last updated: July 2026

SHA-256 (hash function)
SHA-256 is a cryptographic hash function from the SHA-2 family that turns any input into a fixed 256-bit (64-character hexadecimal) value called a digest. The same input always yields the same digest, but the process is one-way — you cannot reverse a digest back to the original — which makes it useful for integrity checks and fingerprints.
Hash Generator (SHA-256)

Generate SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text using the secure Web Crypto API. Free, instant, in-browser.

Open the tool →

What a hash is

A hash function maps data of any size to a fixed-size value. Good cryptographic hashes are deterministic, fast to compute, infeasible to reverse, and collision-resistant — it's practically impossible to find two inputs with the same digest. Changing a single bit of input changes the digest completely.

What it's used for

SHA-256 verifies file integrity (compare digests before and after transfer), fingerprints data, and underpins signatures and blockchains. Note: for storing passwords you should use a slow, salted algorithm like bcrypt or Argon2 — a plain fast hash like SHA-256 is not sufficient on its own.

FAQ

Can you reverse a SHA-256 hash?

No — hashing is one-way. You can only guess inputs and compare their digests.

How long is a SHA-256 hash?

256 bits, usually shown as 64 hexadecimal characters.

Related terms

Sources & further reading