Skip to content
ToolsOnDuty - free online tools
Developer ToolsNovember 6, 2026

How to Calculate File Checksums and Verify Downloads

Calculate four checksums locally, compare an exact SHA-256 value and understand what a matching file hash can and cannot prove.

By ToolsOnDuty Editorial Team

File checksum tutorial using an original sample document

A file checksum is a compact representation of a file's bytes. It helps you compare a downloaded file with an expected version without comparing every byte manually. The useful question is not whether a checksum looks complicated, but whether the same algorithm produces exactly the value supplied by a trustworthy source.

This walkthrough uses two original text files and the ToolsOnDuty File Hash tool. We calculated MD5, SHA-1, SHA-256 and SHA-512, checked all four against independent Node.js results, and changed one capital letter to observe the difference. No private documents or real account information were used.

1. Obtain an expected checksum from a trustworthy source

Before selecting a file, find the publisher's expected checksum and note its algorithm. A SHA-256 value must be compared with the SHA-256 row, not MD5 or SHA-512. Ideally, get the expected value from an authenticated publisher page or another channel whose identity you have checked. A digest copied from the same untrusted download message is not independent evidence of authenticity.

Also confirm the exact release, operating system, architecture and archive variant. Two legitimate packages can have different hashes because their bytes differ. If the publisher supplies a signed checksum manifest, checking its signature is a separate task. This tool calculates file digests; it does not authenticate the person or organization that supplied your expected value.

2. Select a file and inspect the four result rows

Open File Hash and choose a file, or drop one onto its upload area. Our first file was checksum-demo.txt. It contained the text ToolsOnDuty checksum demo. followed by a Windows CRLF line ending. The exact ending matters because the tool hashes bytes rather than only the visible sentence. After processing, all four algorithm rows appeared below the filename.

The SHA-256 result for those exact sample bytes was the value below. The screenshot records the live browser result, not an invented dashboard. If you recreate the sample with an editor that writes LF instead of CRLF, you should expect a different checksum even though the sentence looks identical. That difference is normal, not evidence that the calculator is broken.

text
SHA-256, including the sample's final CRLF:
32ec74de35fff748a4af04f64fea27253641c28c5f017c05713d120b6472e59c
Four file checksums for checksum-demo.txt in ToolsOnDuty
Real File Hash output for our original text file. Its final CRLF is included in the hashed bytes.

3. Copy and compare the correct algorithm

Use the Copy control beside the algorithm you need. We verified that the SHA-256 button supplied the exact SHA-256 result string. Compare the entire value with the expected digest, including its beginning and ending. A matching prefix or a similar-looking section is not sufficient. Avoid comparing a screenshot when you can compare the actual text.

The tool does not provide an expected-checksum field or automatically display a match verdict. You perform that comparison yourself. Hexadecimal letter case can be normalized for comparison, but do not delete characters, repair a digest by guesswork or ignore an actual difference. If values disagree, pause before relying on the file and check the release details and source again.

4. See how a one-letter change affects the result

We created checksum-changed.txt by changing demo to Demo while retaining the same CRLF ending. Selecting the changed file replaced the earlier results. All four new digests matched an independent calculation and differed from their original counterparts. The changed SHA-256 began 55d87ff9 instead of 32ec74de, but the meaningful comparison is still the complete value.

This experiment demonstrates sensitivity to file content, not a way to recover the changed letter from a digest. Hashes do not describe the edit or tell you which line changed. If you need a human-readable explanation of differences between text documents, compare the text itself. Keep both original files when diagnosing a mismatch rather than overwriting your only reference copy.

Changed file checksums after replacing demo with Demo
The real second result after one capital-letter change. All four digests changed and matched independent calculations.

5. Understand byte differences that are not obvious visually

Line endings, text encoding, a byte-order mark, trailing spaces and a final newline can all affect a text file's bytes. Office documents, images and archives may also change when their internal metadata or packaging changes. A file that renders identically is not necessarily byte-for-byte identical. Do not use a visual preview alone to explain a checksum mismatch.

Conversely, changing only the filename without changing file contents does not change a digest calculated from the bytes. That distinction is useful when a browser adds a duplicate-download suffix. Verify what was downloaded rather than assuming a renamed file must differ. For reproducible checks, record the algorithm, source version and complete digest alongside the file you actually checked.

6. Do not confuse integrity checks with security certification

A matching checksum supports a claim that your bytes match the reference associated with that digest. It does not independently establish that those bytes are harmless, that a document's claims are true, or that the reference came from the genuine publisher. Hashing is not malware scanning, encryption, digital-signature verification or a professional security assessment.

MD5 and SHA-1 have known collision weaknesses and should not be chosen for modern adversarial authenticity checks merely because they are listed. SHA-256 is a common option when a publisher supplies it, but trust in the reference still matters. Follow your organization's download and signature-verification policies. Consult a qualified security professional when the consequences require more than a convenience check.

7. Handle processing limits and keep a clear verification record

File bytes are read and hashed in your browser. Loading the website and its processing library can still involve network requests; local file processing does not mean the whole website works offline. The implementation reads the selected file into memory, so very large files can be slow or exceed practical browser limits. Start with a manageable sample if processing fails.

Wait until the result rows are present and check the displayed filename before copying. If an error appears, address it instead of reusing a digest from a different file. Keep a simple record containing filename, exact release, algorithm, expected digest and observed digest. A verified match is useful evidence for that specific file, not a guarantee about future downloads or permanently unchanged content.

Apply the steps from this guide directly in your browser.

Frequently asked questions

Does a matching file checksum prove a download is safe?

No. It shows agreement with the chosen reference digest, assuming the appropriate algorithm and exact comparison. The reference must be trustworthy, and hashing does not replace malware checks or signature verification.

Why does my recreated text sample have a different checksum?

Check the exact bytes, especially CRLF versus LF, encoding, trailing spaces and the final newline. Our sample includes a final CRLF, so the visible sentence alone is not enough to reproduce it.

Can I paste an expected digest for an automatic match check?

This tool displays four calculated digests and Copy controls. It does not provide an expected-digest input or automatic comparison verdict; compare the correct algorithm's complete value yourself.

Does renaming a file change its checksum?

Not if only its filename changes and the file bytes remain identical. Editing contents or internal metadata can change the checksum even when the document looks the same.