SHA-256 is the hash function that powers Bitcoin. You've already seen what a hash function does — now let's look at SHA-256 specifically: why Satoshi chose it, how it processes data internally, and why it's still considered secure while older algorithms like MD5 and SHA-1 have been broken.
Type anything below and watch the SHA-256 digest update in real time. Notice that the output is always exactly 64 hex characters — that's 256 bits — regardless of whether you type one word or a whole paragraph.
Not all hash functions are created equal. MD5 and SHA-1 were once the industry standard — until researchers found ways to create collisions (two different inputs with the same hash). Once a hash function is broken, it cannot be used to secure financial history. Satoshi chose SHA-256 because it was the strongest standardised option available in 2008, and it remains unbroken today.
You don't need to implement SHA-256 yourself — you'll always use an audited library. But understanding the processing model helps you reason about performance and protocol choices: why inputs are padded, why processing happens in 512-bit blocks, and where that 256-bit output comes from.