Comparing two copies of a file, one byte at a time
The simplest way to see what this page does is with two tiny text files. Make one file containing hello world and a newline, and save it as a.txt. It is 12 bytes. Make a second file with Hello World and a newline in it, save it as b.txt, and pick both here. The verdict is Different, with the first difference at offset 0 (byte 1 counting from 1): 0x68 in the first file and 0x48 in the second. Those are the codes for a small h and a capital H.
Now fix the capital H so b.txt reads hello World. The first byte matches again, and the reading goes on until offset 6, where the first file has 0x77, a small w, and the second has 0x57, a capital W. The page adds that the difference is on line 1, because both files look like text. The sizes are equal at 12 bytes each, so the two SHA-256 rows show two completely different hashes of the same length. One changed letter is enough to change every character of the hash.
Make the files match exactly and the verdict turns to Identical, with the two hash rows the same: a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447 for hello world and a newline. Then add one more newline to the end of b.txt. Now it is 13 bytes and the page reports Different at offset 12, end of file in the first and 0x0A in the second, and says the second file is 1 byte longer. That pattern, a difference exactly where the shorter file ends, almost always means extra bytes at the end, such as a trailing newline.
The same reading works for files of any kind: two copies of a firmware image, a photo before and after a sync, or a backup and its original. The page reads both files in step, a megabyte at a time, so the comparison does not depend on how big the files are. For a binary file the line number would mean nothing, so it is not shown. For two text files that differ, the page suggests the Diff Checker, which shows every changed line side by side.
Some limits are worth knowing. The page shows the first difference only, not every one. The SHA-256 rows need each file in memory whole, so above about 2 GB they may say the file was too big, even though the byte comparison still works. Text detection looks at the first 8 KB of each file, so a text file with a binary header is treated as binary. And the comparison is of contents only: names, dates and permissions are not compared.