SHA-256 Generator

Use this SHA256 generator to get the 64-character SHA-256 hash of any text, the checksum most download pages and APIs publish today.

Hashed in your browser. Your text is not uploaded.

Hashed as UTF-8. A trailing space or line break changes the hash.

Algorithms

How to use the SHA-256 Generator

  1. Paste or type the text. The SHA-256 row recalculates after each change.
  2. Leave the format on Hex, lowercase to match sha256sum and most websites, or pick Base64 for values such as Subresource Integrity hashes.
  3. Paste the published checksum into Compare with. Case and surrounding spaces are ignored.

How SHA-256 works

SHA-256 belongs to the SHA-2 family that NIST standardized in FIPS 180-2 in 2002. It splits the padded input into 512-bit blocks and runs 64 rounds per block over eight 32-bit words. The output is 256 bits, or 64 hex characters.

No practical attack on SHA-256 is known, which is why it signs TLS certificates, links the blocks in Bitcoin, and checks software downloads. This page calls the browser's own crypto.subtle.digest('SHA-256', ...) on the UTF-8 bytes of your text, so nothing is uploaded.

Examples

InputSHA-256 (hex)
abcba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
hello2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
Hello185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969
empty texte3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

In Base64, the hash of hello is LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ=. Same bytes, shorter text.

Limitations

  • A plain SHA-256 is too fast for storing passwords. Use bcrypt or Argon2 for that.
  • To prove who made a value, a hash alone is not enough. Use an HMAC with a secret key, as the HMAC Generator does.
  • The box hashes text, not files. A trailing newline counts: hello plus a line break hashes to 5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03.

Frequently asked questions

Is SHA-256 the same as SHA-2?

SHA-256 is one member of SHA-2. The family also includes SHA-224, SHA-384, SHA-512, and two truncated SHA-512 versions.

Can two texts have the same SHA-256 hash?

In theory yes, since there are more possible texts than hashes. Nobody has found such a pair, and finding one by search would take far longer than the age of the universe with today's computers.

Why does my SHA-256 not match the one on the download page?

A download page publishes the hash of the file. This box hashes the text you type, so the two match only when the text is exactly the file's content, final newline included.

Often used together with SHA-256 Generator.

  • SHA-3 Generator

    SHA3-224, SHA3-256, SHA3-384, SHA3-512, and Keccak-256 hashes of text.

  • HMAC Generator

    Signs text or files with HMAC-SHA256 and other hashes, and checks signatures.