Worked examples

SHA-256 of abc — check a known hash

Check the SHA-256 hash of abc without a newline. Reproduce the full 64-digit result and see why whitespace and file bytes matter.

A known input is a useful way to check how a hashing tool works. This example hashes the three UTF-8 bytes of abc, with no surrounding spaces or newline. The expected SHA-256 result is shown in full below so that you can compare every hexadecimal digit.

Example input

abc

Expected result

ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad

Try it step by step

  1. Open Hashing Lab and select SHA-256.
  2. Enter abc in the text field without a trailing newline. Do not select a file for this example.
  3. Calculate the hash and compare all 64 hexadecimal digits with the expected result.

How to read the result

SHA-256 produces a 256-bit result, commonly written as 64 hexadecimal digits. A newline, a space, a different letter case or a byte-order mark changes the input and therefore the result. A file containing abc plus a newline is not the same input as this example.

Limits and important details

A matching checksum confirms agreement with an expected value, not that a file is safe. Obtain reference checksums from a trusted source. Plain SHA-256 is not a password-storage scheme; use a password-specific construction for that purpose.

Open the tool