Compare two files byte for byte
Check whether two files are byte-identical. Hashes both with SHA-256, shows the digests side by side and pinpoints the first differing byte offset.
- Runs in your browser
- Files are never uploaded
- Free, no account
Both files stay on your machine. They are read side by side in 4 MB slices, hashed with SHA-256 and compared byte by byte in this tab. Nothing is uploaded, so comparing two multi-gigabyte backups costs nothing but local disk reads.
Add both files to compare them. A useful pair: the file you just downloaded and the copy you already had, or the original and the one that came back off a backup.
How to compare two files
- Drop one file into each panel. Order does not matter, and the files can have different names, live in different folders and carry different timestamps.
- Let the comparison run. Both files are read side by side in 4 MB slices. SHA-256 is computed for each while the bytes are compared directly, all in a single pass.
- Read the verdict. Identical means byte-for-byte identical contents. Different means at least one byte differs, and the panel tells you which one.
- Copy either digest if you need to paste it into a ticket, a release note or a message.
What is compared, and what is ignored
| Property | Affects the verdict? |
|---|---|
| File contents (every byte) | Yes — this is the whole comparison. |
| File length | Yes. Different lengths cannot be identical files. |
| Filename | No. |
| Folder or drive | No. |
| Created and modified timestamps | No. |
| Permissions and ownership | No. |
| Extended attributes, resource forks, alternate data streams | No — the browser cannot see them. |
That last row is worth remembering on macOS and Windows: two files can be byte-identical in content while differing in metadata the browser has no access to. For ordinary use — checking whether a copy survived, whether a download matches, whether two backups diverged — content is what you care about.
Why the first differing byte is useful
Knowing that two files differ tells you little. Knowing where they first differ usually tells you why:
- Offset 0. Completely different files, or the same content in a different container format. Check the file signatures.
- A small offset, inside the header. Embedded metadata: a timestamp, a producer string, a compression level, a UUID written by the exporting application. Common with PDFs, ZIPs and images.
- Deep into the file, with a matching prefix and one file shorter. A truncated or interrupted copy. The tool reports "beyond the shorter file" when one file is an exact prefix of the other, which is the classic signature of an incomplete download.
- Deep into the file, same length. A single corrupted block, a bit flip from failing storage, or a targeted modification. Isolated damage in the middle of an otherwise matching file usually means hardware, not malice.
- Right at the very end. A trailing newline, an appended signature block, or padding added by an archiver.
Common reasons two "identical" files differ
- Line endings. A text file that has passed through Windows has CRLF where the original had LF. Every line is different at the byte level even though the content reads the same.
- A trailing newline. Editors disagree about whether the last line should end with one. One byte, completely different digest.
- Text encoding. UTF-8 with a byte-order mark versus without. Three invisible bytes at offset 0.
- Timestamps inside archives. Zipping the same directory twice produces different bytes because the entries record the moment of compression.
- Image and document metadata. EXIF, XMP and PDF producer strings change when a file is re-saved, even with no visible edit.
- Silent corruption. Rare, but real — this is precisely what checksums exist to catch.
Handling very large files
Both files are streamed rather than loaded, so peak memory stays in the low megabytes whether you are comparing two text files or two 50 GB disk images. The bottleneck is disk read speed, and the panel reports combined throughput so you can see it. Nothing is uploaded, which is what makes comparing large private files practical at all — a server-based comparison would mean transferring both files in full.
SHA-256 is computed alongside the byte comparison, so you get the digests for free. Two files with the same SHA-256 are identical for every practical purpose; the direct byte comparison is what allows the tool to pinpoint the divergence rather than just report a mismatch.
Good uses for this
- Confirming a backup or a restore is faithful before deleting the original.
- Checking that a large file copied to an external drive or NAS arrived intact.
- Deciding whether two similarly named files in your downloads folder are duplicates.
- Verifying that a build is reproducible — that the same inputs produced the same artefact.
- Checking that an export from one tool matches an export from another.
- Confirming that a file you were sent matches the copy you already had.
Questions
What does "byte-identical" actually check?
Only the contents. The two files are read side by side and compared byte by byte while SHA-256 is computed for each, so filenames, folders, timestamps and permissions are all ignored. Two files with different names in different folders can still be identical, and that is what the verdict reports.
Why show the first differing byte offset?
Because it tells you what kind of difference you are looking at. An offset of zero usually means a completely different file or a different container format. A difference deep in the file with everything before it matching usually means a truncated download, an appended signature or a single corrupted block.
Can it compare files that are too big to fit in memory?
Yes. Both files are streamed in 4 MB slices, so peak memory stays in the low megabytes no matter how large the files are. Comparing two multi-gigabyte disk images or backups is limited only by your disk read speed, and progress is shown throughout.
The files look the same but the hashes differ. What changed?
Something invisible. The usual culprits are trailing whitespace or a final newline, CRLF versus LF line endings, embedded timestamps or metadata written by an exporting application, or a different compression level that produced the same visible content from different bytes. The first-difference offset narrows it down quickly.