FormatterHQ

SHA-256 Hash Generator

Create SHA-256 hashes of text or files — the secure, standard 256-bit digest used for checksums, signatures, blockchains and APIs.

Loading tool…
Ready.

How to use the SHA-256 Hash Generator

  1. Type or paste text into the input box, or switch the source to File and choose a file — it is hashed locally, never uploaded.
  2. Read the main hash at the top — the table below shows the same input under every other common algorithm. Tick Uppercase hex if you need capitals.
  3. To verify a value, paste it into Compare with an expected hash — the tool reports a match, or which algorithm it matches instead. Copy any row with its Copy button.

SHA-256 hash generator for text and files

SHA-256 is today’s default cryptographic hash. A member of the SHA-2 family designed by the NSA and standardised by NIST in FIPS 180-4, it maps any input to a 256-bit value written as 64 hexadecimal characters. This SHA-256 hash generator computes that fingerprint for text you type or a file you upload, entirely in your browser.

Example

Input:

The quick brown fox jumps over the lazy dog

SHA-256 hash:

d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592

Change “dog” to “cog” and the hash becomes e4c4d8f3bf76b692de791a173e05321150f7a345b46484fe427f6acc7ecc81be. Roughly half of the output bits flip for any change — the avalanche effect that makes hashes reliable fingerprints. The hash of an empty input, e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855, is worth recognising: seeing it usually means something hashed nothing by mistake.

SHA-256 at a glance

PropertyValue
Digest size256 bits (32 bytes, 64 hex characters, 44 Base64 characters)
Block size512 bits; 64 rounds on 32-bit words
StructureMerkle–Damgård with a Davies–Meyer compression function
Collision resistanceAbout 128 bits
StandardFIPS 180-2 (2002), now FIPS 180-4
StatusSecure; no practical attacks known

Properties that make SHA-256 useful

  • Deterministic: the same bytes always give the same hash, on every platform.
  • Preimage resistant: given a hash, there is no feasible way to find an input that produces it.
  • Collision resistant: finding two different inputs with the same hash would take around 2¹²⁸ operations.
  • Fast: modern CPUs with SHA extensions hash well over a gigabyte per second per core.

Where SHA-256 is used

  • Download verification. Publishers list SHA-256 checksums; compare with sha256sum file (Linux), shasum -a 256 file (macOS) or Get-FileHash file (PowerShell’s default) — or upload the file here.
  • TLS certificates and code signing, where SHA-256 replaced SHA-1.
  • Bitcoin mining and transaction IDs (double SHA-256), and many other blockchains.
  • Content addressing in Docker image digests (sha256:…), Git’s SHA-256 object format and package lock files.
  • API signing with HMAC-SHA256 — AWS Signature Version 4, webhook signatures and JWT HS256.

What SHA-256 is not for

Passwords. SHA-256 is designed to be fast, which is the opposite of what password storage needs: a GPU can try billions of SHA-256 guesses per second. Even salted SHA-256 is too quick. Use a deliberately slow, salted password hash — bcrypt, Argon2id, scrypt, or PBKDF2 with a high iteration count.

Secret-keyed MACs built by concatenation. Because SHA-256 uses the Merkle–Damgård construction, SHA256(secret + message) is vulnerable to length-extension attacks: an attacker who knows the hash can append data and compute a valid new hash without the secret. Use HMAC-SHA256, which is designed for exactly this.

And remember that a hash cannot be “decrypted”. Lookup sites can only find inputs that were already in their tables, which is why hashes of guessable data, such as phone numbers or short IDs, offer little privacy on their own.

Getting matching results

SHA-256 works on bytes. This tool encodes text as UTF-8, matching sha256sum, Python’s hashlib.sha256(s.encode()), Node’s crypto.createHash('sha256') and PHP’s hash('sha256', $s). The usual causes of mismatches are a trailing newline (echo adds one; use printf or echo -n), CRLF versus LF line endings, and invisible characters such as a byte order mark. Lowercase and uppercase hex represent the same value.

Need a different output length? The SHA-2 Hash Generator offers every SHA-2 variant in one place. Hashing is done locally in your browser, so files and text are never uploaded.

Frequently asked questions

Can a SHA-256 hash be decrypted or reversed?
No. SHA-256 is a one-way function, not encryption. Lookup websites only succeed for inputs already in their databases, such as common passwords.
Is SHA-256 good for hashing passwords?
Not on its own. It is too fast, so attackers can test guesses very quickly. Use bcrypt, Argon2id, scrypt or PBKDF2 with a high work factor.
How long is a SHA-256 hash?
256 bits: 32 bytes, shown as 64 hexadecimal characters or 44 Base64 characters.
Why does my SHA-256 not match the one from the command line?
The bytes differ, usually because echo added a newline or the file has different line endings. Use printf or echo -n when hashing text in a terminal.
Has SHA-256 ever had a collision?
No collision has ever been found. The best known attacks only work on reduced-round versions and are far from threatening the full algorithm.

Last updated September 26, 2026

Guides

Related tools

SHA3-224 Hash Generator Generate the SHA3-224 hash of any text or file online. Instant 224-bit digest in hex, computed in your browser. SHA3-256 Hash Generator Generate the SHA3-256 hash of any text or file online. Instant 256-bit digest in hex, computed in your browser. SHA3-384 Hash Generator Generate the SHA3-384 hash of any text or file online. Instant 384-bit digest in hex, computed in your browser. SHA3-512 Hash Generator Generate the SHA3-512 hash of any text or file online. Instant 512-bit digest in hex, computed in your browser. SHA-384 Hash Generator Generate the SHA-384 hash of any text or file online. Instant 384-bit digest in hex, computed in your browser. SHA-512/224 Hash Generator Generate the SHA-512/224 hash of any text or file online. Instant 224-bit digest in hex, computed in your browser. SHA-512/256 Hash Generator Generate the SHA-512/256 hash of any text or file online. Instant 256-bit digest in hex, computed in your browser. SHA-512 Hash Generator Generate the SHA-512 hash of any text or file online. Instant 512-bit digest in hex, computed in your browser. SHAKE-128 Hash Generator Generate SHAKE-128 extendable-output (XOF) hashes of any length from text or files. SHAKE-256 Hash Generator Generate SHAKE-256 extendable-output (XOF) hashes of any length from text or files. SRI Hash Generator Generate Subresource Integrity (SRI) sha384 hashes and ready-to-paste <script> or <link> tags with integrity and crossorigin attributes. SSH Key Generator Generate OpenSSH key pairs (Ed25519, RSA, ECDSA) in id_ed25519 / id_rsa format with fingerprint — created locally, like ssh-keygen.