SHA-256 Hash Generator

Compute the 256-bit SHA-256 digest of any text

Free online SHA-256 hash generator. Paste any text and get its 64-character hexadecimal SHA-256 digest instantly, computed in your browser with the Web Crypto API — nothing is uploaded. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is SHA-256?

SHA-256 is a member of the SHA-2 family standardised by NIST in FIPS 180-4. It maps any input to a fixed 256-bit (32-byte) digest, shown here as 64 hexadecimal characters.

What this SHA-256 generator does

This tool computes the SHA-256 cryptographic hash of whatever text you enter. SHA-256 produces a fixed 256-bit output regardless of input length, displayed as 64 hexadecimal characters. It is the gold-standard hash for general-purpose integrity and security: file integrity checks, digital signatures, blockchain addresses, certificate fingerprints, HMAC keys, and API request signing all rely on SHA-256 as their foundation.

How SHA-256 works

SHA-256 is part of the SHA-2 family defined in NIST FIPS 180-4. Your text is first encoded to bytes as UTF-8, then padded so its length is congruent to 448 modulo 512 bits, with the original 64-bit bit-length appended. The message is then processed in 512-bit blocks.

For each block, SHA-256 maintains eight 32-bit working variables (a through h) and runs 64 rounds. Each round:

  1. Computes two “sigma” values using right-rotates and XORs of the top variables
  2. Applies the “choice” function (e AND f) XOR (NOT e AND g) and the “majority” function (a AND b) XOR (a AND c) XOR (b AND c)
  3. Adds the round constant (from the fractional parts of the cube roots of the first 64 primes) and the current message word
  4. Rotates all working variables

After 64 rounds, the block’s eight outputs are added back to the previous state. The final state concatenated as 256 bits is the digest. This tool delegates that work to the browser’s native crypto.subtle.digest("SHA-256", data), which is fast, correct, and constant-time.

Where SHA-256 appears in practice

  • Bitcoin and cryptocurrencies — every Bitcoin transaction ID is the double-SHA-256 of the transaction data; the Proof-of-Work mining algorithm finds an input whose SHA-256 hash starts with enough leading zero bits.
  • TLS certificates — modern X.509 certificates are signed with SHA-256, replacing SHA-1 which was retired from this use after collision vulnerabilities were found.
  • Code signing — macOS Gatekeeper, Windows Authenticode, and Linux package managers (apt, rpm) all verify SHA-256 hashes of installers and packages.
  • Content addressing — Docker image layers, Git’s next-generation SHA-256 object store, and many blob stores use SHA-256 as the address of stored content.
  • HMAC and API signingHMAC-SHA256 is the most widely used message-authentication code, used in AWS Signature Version 4, JWT (HS256), and most webhook-verification schemes.

Common questions about SHA-256

Can I reverse a SHA-256 hash? No — SHA-256 is a one-way function. You cannot recover the original input from the hash. However, if the input space is small (a short password, a four-digit PIN), a brute-force or dictionary attack can try all possibilities and find which one matches. This is why passwords need salting and a slow KDF on top of SHA-256.

Will the same input always produce the same hash? Yes, deterministically. That determinism is what makes hashes useful as fingerprints. The same text, encoded the same way, always produces the same 64-character output.

What changes if I change one character? The entire digest changes completely and unpredictably — about half the output bits flip on average. This avalanche effect prevents partial information from leaking through the hash.

Reference values

  • Empty string: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
  • abc: ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
  • hello world: b94d27b9934d3e08a52e52d7da7dabfac484efe04294e576fbc68f537f9d0d8c

Use these to confirm that any SHA-256 implementation is working correctly. Everything here runs in your browser via the Web Crypto API; nothing is uploaded.