When you open a file checksum tool you see options like MD5 and SHA-256. Understanding the difference makes it clear which one to use in which situation.
What a checksum is
A checksum, or hash, is a short fingerprint-like value calculated from a file's content. The same file gives the same value wherever and whenever you calculate it, and changing even one character gives a completely different value.
So to see whether two files are identical you can compare the values instead of the whole files. The reverse is impossible: the value cannot be turned back into the original file. As an easy analogy, a checksum is like counting the pages and letters of a book, but far more precise: changing a single letter changes the value completely.
Same content — always the same value
Different content — almost certainly a different value
The original cannot be rebuilt from the value
What MD5 is like
MD5 produces a 128-bit value shown as 32 hexadecimal characters. It is very fast and has been used for a long time, so many places still list MD5 values.
However, it is well known that different files can be deliberately crafted to share the same MD5 value, so it is not recommended where security matters. The chance that two different files accidentally share the same value is negligible in practice. The problem with MD5 is that collisions can be created on purpose.
Length — 32 characters (128 bits)
Strength — fast and widely compatible
Weakness — vulnerable to deliberate tampering
What SHA-256 is like
SHA-256 produces a 256-bit value shown as 64 hexadecimal characters. It is widely trusted today and is the most common way to verify downloaded files.
The longer value takes slightly more time to compute, but on an ordinary computer you will hardly notice. Because the value is short and quick to compute, MD5 is still handy for jobs unrelated to security, such as finding duplicate files.
Length — 64 characters (256 bits)
Strength — widely trusted for security purposes today
Weakness — longer and a little slower than MD5
Choosing for your situation
If you only want to confirm a file was not damaged in transit, MD5 is sufficient. If you need to guard against someone changing the file on purpose, always use SHA-256.
What matters most is which value the publisher provides. You must calculate it the same way to make the comparison meaningful. If a download page offers both values, compare the SHA-256 one. The principle is to favor the more trustworthy of the two.
Simple damage check — MD5 is acceptable
Authenticity or tamper check — SHA-256
When unsure — default to SHA-256
How to compare values
Drop the file on the File Checksum tool, choose the method and the value appears. Rather than checking every character by eye, copy and paste both values to compare.
Upper and lower case are normally treated as the same value; just make sure no stray spaces were copied before or after. Comparing only the first and last few characters by eye is risky. Make it a habit to paste both complete values and compare them.
Confirm you calculated it the same way (MD5 or SHA-256)
If even one character differs, treat it as a different file
A match does not prove the source itself is trustworthy