Small SEO Tools

How to Verify a Downloaded Document with SHA-256

To check a downloaded document against a published SHA-256 checksum, calculate the digest of the saved file itself. Keep the publisher’s expected value beside the result so you can compare the complete strings.

Identify the file and its expected checksum

Find the publisher’s SHA-256 value for that exact document version. Record its source, the document version and the algorithm. A checksum for another edition or format will not verify your download.

Keep the downloaded file unchanged during the check. The checksum covers its contents. Obtain the reference checksum from an independently trusted publisher source. A match checks integrity against that reference, without proving authorship or that the document is safe to open.

Calculate the saved file hash in PowerShell

In PowerShell, replace this example path with the actual path of your downloaded document, then run the read-only command.

Get-FileHash -LiteralPath 'C:\Users\YourName\Downloads\workshop-notes.txt' -Algorithm SHA256

Check the returned Path and Algorithm, then read Hash. Microsoft documents Get-FileHash and its LiteralPath parameter, which treats the supplied path literally.

The command reads the file bytes. For automation in Python, the file_digest helper similarly uses a file opened in binary mode. Copying visible document text into a different input does not preserve every byte of the saved file.

Compare the complete hexadecimal values

Replace the placeholder below with the publisher’s full 64 hexadecimal digits. Replace the path with the same file path you checked above.

$expected = 'PASTE_PUBLISHED_SHA256_HERE'
$actual = (Get-FileHash -LiteralPath 'C:\Users\YourName\Downloads\workshop-notes.txt' -Algorithm SHA256).Hash
$actual -eq $expected

PowerShell’s comparison returns True for matching values and False for different values. Its default string comparison ignores letter case, so uppercase and lowercase hexadecimal spellings can match. Microsoft explains these rules in its comparison operator documentation.

If the result is False, recheck the selected file, document version, algorithm and copied reference value. Obtain a fresh copy from the intended source if needed, then hash that file again. Renaming a file changes its label, rather than repairing different contents.

Recognize a filename hash

The SHA-256 Generator on this site accepts text. To test that distinction, choose SHA-256 and Hexadecimal, leave Uppercase hex output unchecked, and enter workshop-notes.txt without a newline.

Press Generate hash. The tool reports 18 UTF-8 bytes and produces this digest of the filename text.

70b82250de0c59108fd555d27fd6a6c3e7accb7de49515256a772d7a4146e08c

That operation does not read the file on your computer. Use the file-byte result for the download check. For differences between actual text inputs, see the guide to text hash mismatches. Keep the file path, expected checksum source and final comparison result together in your review record.