Why check a file's checksum
Software publishers list a checksum, a short fingerprint of the file, next to their downloads. Compare your file’s SHA-256 with a digest from a trusted publisher page or signed release. A match checks the bytes against that reference. Someone who supplies both the file and the digest can make them match.
How it works
Your browser reads the file in chunks and computes SHA-256, SHA-1 and MD5 locally. The file is never uploaded, so it works for large files and private documents alike.
Try a three-byte file
Save the three lowercase letters abc as plain UTF-8 with no newline or byte-order mark. Its SHA-256 is ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad. Adding a final newline changes the result.
Questions
Which hash should I compare?
Use SHA-256 when the publisher offers it. MD5 and SHA-1 are fine for catching corruption but not for detecting deliberate tampering.
Is there a size limit?
No fixed limit. Very large files take longer, depending on your device.