Compare Two Binary Files by Byte Offset

Bitpeek compares the current bytes with a local reference file, highlights every different offset, groups adjacent changes, and can export a human-readable offset patch.

How to compare binary files

  1. Open the current file. This is the byte sequence shown in the main workspace.
  2. Choose Compare. Select the local reference file. Neither file is uploaded.
  3. Review the diff bar. Bitpeek reports modified bytes, bytes present only in the current file, and bytes present only in the reference.
  4. Navigate changes. Previous and Next move the byte selection through the difference offsets.
  5. Export if needed. Copy or download the reference-to-current offset patch as JSON.

What offset-based diff means

Bitpeek compares byte 0 with byte 0, byte 1 with byte 1, and so on. Adjacent offsets with the same difference type are grouped into ranges. This is deterministic and useful for controlled changes at known positions.

An insertion near the beginning shifts every later byte and therefore produces many differences. Bitpeek does not attempt sequence alignment, binary-format parsing, or semantic comparison.

Reproducible offset patch output

The exported bitpeek-offset-patch document records source and target lengths, contiguous remove/insert byte ranges, file labels, and SHA-256 digests for both sides.

The patch is designed to document a reference-to-current transformation. It is not an executable program and should still be reviewed before use in another workflow.

Good uses for a byte-level diff

  • Confirming that a controlled test changed only the expected offsets.
  • Comparing two compact firmware fragments, fixtures, or encoded records.
  • Documenting a manual hex edit with source and target hashes.
  • Finding the first divergent byte in two same-layout files.

Local processing and privacy

The Binary diff workflow opens the same Bitpeek browser workspace. Selected file bytes, file names, pasted input, searches, edits, hashes, and comparison data are processed in local browser memory and are not sent to a Bitpeek server.

The static guide itself can be read without opening a file or creating an account.

Frequently asked questions

Are both comparison files uploaded?

No. Both files are read and compared inside the same browser session.

Does Bitpeek align inserted or deleted blocks?

No. The comparison is intentionally offset-based. A shifted block remains visibly shifted rather than being realigned heuristically.

What does the patch contain?

It contains source and target metadata, SHA-256 digests, and contiguous hexadecimal remove/insert ranges with their offsets.