Code · Made a little simpler

Binary File Comparator

Compare two local files by exact bytes. Find matching and different positions, first and last offsets, and extra bytes at the end.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

Binary File Comparator: how to use it

  1. Choose a left and right file or load the example pair.
  2. Select Compare bytes. Check the match count, the first and last difference, and the number of bytes found only in the longer file.
  3. Open the range table to compare hexadecimal samples at each listed offset. Copy or download the counts and offsets as JSON.

Limits and notes

Runs on your device. Reads shared byte positions in 256 KiB chunks for files up to 512 MB each. Counts all differences and lists the first 128 ranges, with up to eight sample bytes per side. The JSON summary omits file names and sample bytes.

How your privacy works →

Binary File Comparator: common questions

Do offsets start from zero?

Yes. Offset 0 is the first byte. The table gives both decimal and hexadecimal and includes the start and end of each range.

How does the tool count a longer file?

It checks every position shared by the files, then counts each remaining byte on the longer side. A trailing byte has no matching position on the shorter side.

Does the comparison realign a file after an insertion?

It compares the same offsets in the left and right file. An insertion can shift the remaining bytes and produce more reported differences.

Guides