A hash generator for SHA-1, SHA-256, SHA-384 and SHA-512 fingerprints of any text, and check a download against its published checksum. Computed by your browser's built-in crypto: nothing is sent.
A good hash reacts wildly to tiny edits: about half of all the output bits flip. That's what makes it useful for spotting tampering. Edit the second line.
Three ways to transform data, for three completely different jobs.
SHA-1 and SHA-2 process fixed-size blocks: 64 bytes for SHA-256, 128 for SHA-512. FIPS 180-4 pads every message the same way. Append the byte 80, then zeros, then the message length in bits as a big-endian integer, so the total fills a whole number of blocks. A message one byte too long for the last block spills into a whole new one. Type to see the padded input built live.
With an n-bit hash there are 2ⁿ possible outputs, but random collisions appear after only about 2ⁿᐟ² inputs, as in the birthday paradox. That’s why a 128-bit hash gives just 64 bits of collision resistance. The odds below use p ≈ 1 − e^(−k²/2ⁿ⁺¹) for k random inputs; deliberate attacks on broken algorithms like MD5 and SHA-1 are far faster than this.
Block sizes, word sizes and rounds from FIPS 180-4 and FIPS 202, the security level against each kind of attack, and whether this browser’s Web Crypto can compute it.
For the jobs next to hashing.