Developer & Web
Verify a SHA-256 Text Checksum and Diagnose a Mismatch
Compare a trusted expected SHA-256 digest with a text calculation, keep digest formatting separate from message bytes, and diagnose common mismatch causes.
Establish what the expected checksum covers
Before calculating a SHA-256 value online, identify the exact object the expected digest describes. It might cover a text message, a binary file, decoded Base64 bytes or one part of a larger record. The local SHA-256 Generator hashes text encoded as UTF-8. If the published checksum covers a downloaded file's raw bytes, copying its visible text into this form may change its encoding or line endings. Select a file-aware verification workflow for that case. A mismatch is only meaningful when the expected and calculated digests refer to the same input definition.
Start with a known text check
The lowercase three-letter message abc, with no extra spaces or newline, produces ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad. Enter that exact text in the local tool and compare all 64 hexadecimal characters. This is a small reproducible check of the chosen operation and avoids uncertainties about a larger copied document. The digest is deterministic: the same bytes processed with SHA-256 yield the same result. Repeating the test with a different input should not be expected to keep the checksum unchanged merely because the new text has the same length.
Distinguish digest case from message case
The hexadecimal strings ba78 and BA78 denote the same two byte values; letter case in a printed HEX digest is formatting. In contrast, abc and ABC are different messages because their ASCII byte values differ. Normalize the display case of an expected HEX digest if needed for comparison, but do not uppercase or lowercase the source message unless that preprocessing is explicitly part of the protocol. Similarly, removing spaces around a copied digest can be appropriate formatting cleanup, while removing spaces from the message itself changes what is being hashed.
Look for invisible differences in the input
A trailing newline, a leading space or a tab can explain a checksum mismatch. Two visually similar Unicode strings can also have different encoded bytes, such as a precomposed accented character and a base letter followed by a combining mark. The local tool preserves the supplied text for hashing rather than guessing which differences should be ignored. Keep a record of the expected encoding and any normalization rule. If a message was copied through several applications, compare its actual byte representation in a suitable inspection tool before deciding that the displayed wording proves the inputs were identical.
Check the digest representation and algorithm
A SHA-256 digest contains 32 bytes, commonly shown as 64 hexadecimal characters. The same digest may be represented as Base64 in another system, so comparing the two strings directly will fail even when their decoded digest bytes agree. Confirm the algorithm as well: SHA-1, SHA-256 and SHA-512 are different functions, and an output of a different expected length can reveal the wrong selection. The standalone local SHA-256 page uses SHA-256. If using the general Hash Generator instead, inspect its selected algorithm before treating its output as an equivalent verification result.
Do not use an untrusted checksum as proof of origin
A matching digest can support an integrity comparison when the expected value comes from a source you trust for that purpose. If both a message and its digest are supplied by the same untrusted party, their agreement does not establish that the message is authentic or safe. An attacker can compute a digest for a changed message just as anyone else can. Where publisher identity matters, use the relevant authenticated distribution channel or verified signature process. The text hash tool computes a number from bytes; it does not inspect a file for malware or verify the identity of its publisher.
Keep a useful mismatch record
Save the named algorithm, expected representation, complete expected digest, complete calculated digest and the input definition. Note whether the message had a final newline, which text encoding was used and whether any explicit preprocessing was applied. Start troubleshooting by reproducing the short abc check, then change one relevant input detail at a time. Avoid repeatedly editing the message until a preferred digest appears without understanding why it changed. The goal is to verify the intended bytes against an independently meaningful reference, not merely to make two displayed strings look alike.
Use the SHA-256 Generator
Source and scope
NIST: Secure Hash Standard and message digests