Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

SHA-256 Digest (hex)
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
256-bit (64 hex characters)
Algorithm SHA-256 (SHA-2 family)
Input length 3 bytes (UTF-8)
Output size 32 bytes / 256 bits

What is SHA-256?

SHA-256 is a member of the SHA-2 family of cryptographic hash functions, standardized by NIST. It takes an input message of any length and produces a fixed 256-bit (32-byte) digest, displayed here as 64 hexadecimal characters. The same input always yields the same digest, while even a one-character change produces a completely different output (the avalanche effect). SHA-256 is widely used in TLS certificates, digital signatures, blockchain (Bitcoin), and file-integrity checks.

Flat diagram showing input text passing through a SHA-256 function box and producing a fixed 64-character hexadecimal digest
SHA-256 maps any input to a fixed 256-bit (64 hex character) digest.

How to use this calculator

Type or paste any text into the input box and submit. The calculator UTF-8 encodes your text, runs the SHA-256 algorithm, and returns the hexadecimal digest along with the input's byte length. An empty input is valid and produces the well-known empty-string digest.

The formula explained

The core operation is:

$$\text{Hash} = \operatorname{SHA\text{-}256}\!\left(\text{Input Text}\right)$$

SHA-256 pads the message so its length is a multiple of 512 bits, splits it into 512-bit blocks, and processes each block through 64 rounds of bitwise operations (rotations, shifts, AND/XOR, modular addition) mixing eight 32-bit working variables initialized from fractional parts of square roots of primes. The eight registers are added back into the running hash state after each block; concatenating them gives the final 256-bit digest.

Flat diagram showing UTF-8 byte conversion step then SHA-256 producing a 256-bit output broken into eight 32-bit words
The input is first encoded as UTF-8 bytes, then hashed into a 256-bit digest of eight 32-bit words.

Worked example

The input abc (3 bytes) produces the digest ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad. The empty string produces e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 — a standard test vector.

FAQ

Is SHA-256 reversible? No. It is a one-way function; you cannot recover the input from the digest.

Why is my byte count larger than the character count? Non-ASCII characters (accents, emoji, CJK) take multiple bytes in UTF-8, so the byte length can exceed the number of characters.

Is SHA-256 still secure? Yes. As of today there are no practical collision or preimage attacks against SHA-256; it remains a recommended hash for general use.

Last updated: