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
abcExpected result
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015adTry it step by step
- Open Hashing Lab and select SHA-256.
- Enter abc in the text field without a trailing newline. Do not select a file for this example.
- 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.