SHA-256 Hash Generator
Create a SHA-256 digest locally in your browser.
SHA-256 Hash Generator
Hash the supplied text without sending it to a server.
- Enter text
- Choose output
- Generate hash
SHA-256 is one-way: the original text cannot be recovered from its digest.
SHA-256 hashing: integrity checks explained
Learn what SHA-256 does, why it differs from encryption, and when an HMAC is the better choice.
SHA-256 is a member of the SHA-2 family of cryptographic hash functions. It converts a sequence of bytes into a 256-bit digest, normally displayed as 64 hexadecimal characters. The digest changes dramatically when even one input byte changes, which makes SHA-256 useful for checking that an expected public file or message has not changed accidentally. Like every ordinary hash, it is one-way and cannot be used to recover the original text.
To compare a SHA-256 digest, both sides must hash exactly the same bytes. Differences in line endings, hidden whitespace, Unicode normalization, or character encoding can lead to a completely different result. This workspace hashes text locally and displays the resulting digest. It is useful for testing API payloads, development fixtures, and values supplied by a trusted source, but a digest alone does not prove who created the content.
For an integrity check that must withstand an active attacker, publish the expected SHA-256 value through a channel the attacker cannot change, or use a digital signature. When the sender and receiver share a secret, use HMAC-SHA-256 rather than prefixing or appending a secret to a normal hash. For password storage, choose bcrypt, scrypt, or Argon2, since SHA-256 is deliberately fast and therefore unsuitable for slowing down guesses. Hashing, encryption, and authentication solve different problems and should not be substituted for one another.
A careful workflow
- Enter the text exactly as it was sent or stored.
- Compare the complete hexadecimal digest with a value obtained from a trusted source.
- Use HMAC or a signature when you must prove message authenticity.
FAQ
Is SHA-256 encryption?
No. It is a one-way hash that produces a fixed-size digest.
Can two inputs have the same SHA-256 hash?
In theory collisions exist for any fixed-size hash, but SHA-256 remains suitable for current integrity uses when applied correctly.
Should I use SHA-256 for passwords?
No. Use a purpose-built slow password-hashing function instead.
Further reading: NIST Secure Hash Standard (FIPS 180-4)