Generate a SHA-256 hash
SHA-256 turns any input into a fixed 64-character hexadecimal string. The same input always produces the same hash; a one-character change produces a completely different one, which is what makes it useful for integrity checks.
A hash function is a one-way transformation with three properties that make it useful: the output is always the same length, the same input always gives the same output, and a tiny change in the input gives a large change in the output.
SHA-256 outputs 256 bits, written as 64 hexadecimal characters. An empty string still produces a hash. So does a 4 GB video.
What people use it for
- Integrity checks. A download page lists a SHA-256 checksum; you hash the file you received and compare. If they match, the file arrived intact.
- Deduplication. Identical files have identical hashes, so a storage system can store one copy.
- Cache keys and ETags. A hash of the content identifies a version without storing the content.
- Change detection. Hash a configuration file at deploy time; compare it later to see whether anyone edited it.
The avalanche effect, in one example
Hashing hello and hello. — one extra full stop — produces two strings with no visible relationship:
hello → 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
hello. → 5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03
That is the property that makes hashes useless for guessing: you cannot tell that two inputs are similar by looking at their outputs.
Where SHA-256 is the wrong tool
Not for passwords. SHA-256 is designed to be fast, and fast is exactly what an attacker wants: modern hardware tries billions of guesses per second. Password storage needs a deliberately slow, memory-hard function — bcrypt, scrypt or Argon2 — plus a random salt per user.
A plain SHA-256 password table is also vulnerable to rainbow tables: precomputed hashes of common passwords. Salting defeats that, but it does not fix the speed problem. Use the right primitive.
Checking a download, step by step
- Get the published checksum from the vendor's own page, not from the same place you downloaded the file.
- Hash the file you have. A browser-based tool reads it locally, so a 2 GB installer is fine and nothing is uploaded.
- Compare character by character, or paste both into a diff. One wrong character means the file is different, not "close enough".
MD5 and SHA-1 still appear
They are broken for security purposes: deliberate collisions have been produced for both. For a quick "did the file copy correctly" check they still work, because accidental corruption is not an attack. For anything involving trust, use SHA-256 or better.
Questions
Can a SHA-256 hash be reversed?
Not in practice. There is no inverse function; the only route is guessing inputs and hashing them. That is feasible for short or common inputs, which is why hashing a four-digit PIN protects nothing.
Why 64 characters?
256 bits, written two hex characters per byte. 256 ÷ 4 = 64. The length is always the same regardless of input size.
Is SHA-256 still secure?
Yes, for integrity and general hashing. No practical collision or preimage attack exists against it as of writing.
Does hashing a file upload it?
Not with this tool. The file is read in the browser, so large files never leave the device.
Updated 2026-11-16 · written for this site, no trackers, no account.