In short
- A checksum is a short code made from the content of a file.
- Run Get-FileHash on Windows and compare the code with the one from the sender.
- If it matches, the file is intact. Share big files with a free link.
A checksum, also called a hash, is a code that a program calculates from everything inside a file. If even one character changes, the code changes too.
So if the sender gives you the code of the original file, you can calculate the code of your copy. When both are the same, your download is exactly the same file.
What a hash tells you
Microsoft explains that a hash value is a unique value for the content of a file. Names and endings can change without changing the content, and the hash stays the same.
Changing even one character in the content changes the hash. So the hash is a good way to know that a file has not been changed, by accident or on purpose.
SHA-256 and the older ones
SHA-256 is the default in Get-FileHash. The command also supports SHA1, SHA384, SHA512 and MD5.
Microsoft says MD5 and SHA1 are no longer considered secure, and should only be used for simple change checks. Use SHA-256 when you can.
Check it in PowerShell
Open PowerShell and type Get-FileHash, then a space and the path to your file. For example, Get-FileHash C:\Users\you\Downloads\file.zip. It shows the algorithm, the hash and the path.
To choose another one, add -Algorithm and the name, for example SHA512. Compare the hash letter by letter with the code you were given.
Check it with certutil
Windows also has certutil in the Command Prompt. Microsoft lists the form certutil -hashfile InFile followed by the algorithm name, for example SHA256.
Both give the same kind of code, so use the one you like. If the two codes are not the same, download the file again.
When you send files yourself
If you send a very big file, you can calculate the hash first and send the code in a message. The person can then check their copy the same way.
A Room helps because the files are never compressed or converted. The person opens one link in the browser, with no account, and gets the same files you uploaded, so the codes should match.
Never compressed or converted, one link, no account needed. Free up to 10 GB.
Send files that stay exactly the same →Questions
What is a checksum?
A code calculated from the content of a file. If the file changes, the code changes.
Which algorithm should I use?
SHA-256. It is the default in Get-FileHash and MD5 and SHA1 are no longer considered secure.
Does renaming a file change its hash?
No. The hash depends on the content, not on the name.
What if the codes do not match?
Download the file again, and ask the sender to check the code.
