Hex Data Comparison

A hex diff compares binary files as bytes. ABDiff always keeps the raw hex view available, and can also show a parsed Structure view for recognized binary formats.

Ways to Start a Hex Comparison

Drag and drop

File menu

Terminal

Hex Viewer Layout

Standalone hex viewer showing raw bytes and a parsed structure tree

Content is, from left to right:

Hex Diff Comparison

Hex comparison using offset alignment with 8 bytes per row

Hex comparison has two alignment layouts:

Resync is useful when one shifted region would otherwise make the rest of the file appear changed. In Resync, the same horizontal row does not always mean the same absolute offset on both sides. When aligned regions come from different raw positions, ABDiff shows different left and right offsets on purpose.

Hex and Structure

Raw Hex mode shows offsets, hexadecimal bytes, and a decoded text preview. The encoding control affects only that text preview; the raw bytes remain the source of truth.

When ABDiff recognizes a binary format, it adds a Hex / Structure control. Structure mode shows format elements as a tree with element names, offsets, lengths, decoded values, and parser diagnostics. Selecting a structure row selects the matching byte range. Double-clicking a structure row switches back to Hex mode and reveals that range.

In the single-file hex viewer, a supported file can show the structure tree beside the hex bytes. Unsupported files use the full width for raw hex. In a two-file hex diff, Structure mode is available when at least one side is recognized, and Show only differences applies to structure rows as well as raw hex rows.

Format-specific fields may determine details such as byte order or text decoding for that field. For example, ZIP structure fields are parsed according to ZIP rules, while the hex text preview can still be changed with the encoding control.

Supported structure formats include:

Some formats that normally open in another viewer can still be inspected as structure by forcing hex. For example, GIF, TIFF, and WebP normally open as image comparisons, and PEM normally opens as text.

View Options

In the hex view, use the View menu or the toolbar controls to adjust the presentation:

Changing Bytes Per Row does not change the underlying diff result.

Inspect Bytes

Click a byte to select it. Shift-click or use Shift with the arrow keys to extend the selection. In the single-file view, the bottom inspector shows the selected offset, length, matching structure element, and a value preview.

Use the value menu or right-click Copy as to inspect or copy the selected bytes as:

The LE / BE control sets little-endian or big-endian interpretation for multi-byte numbers. When a parsed structure fixes byte order, ABDiff shows that byte order and disables manual changes.

Use the file-info pill at the top left to open summary metadata. In structured files, the same popover includes parser metadata such as container summaries and format-specific facts that are not tied to one byte range.

Find and Go To

Use Edit ▸ Find… to search the active binary surface. In Hex view, Find is smart about byte searches: valid hex syntax such as 1F 8B, 0x1F8B, or 1f-8b searches raw bytes, while text such as Papyrus searches the same bytes as UTF-8 without changing modes. Hex-like input that cannot describe complete bytes still reports an invalid search instead of guessing.

In Structure view, Find automatically matches parsed structure names and values. There is no search mode picker; the active view determines the search target.

Use Navigate ▸ Go to Offset… to jump to a byte offset. Offsets are hexadecimal by default; use 0x for explicit hexadecimal, d: for decimal, or + / - for a relative offset from the selected byte.

Histogram and Entropy

Use the histogram button in the toolbar to inspect byte distribution, entropy, top byte values, and broad classifications such as high entropy or padding-heavy data. In the single-file hex view, the histogram panel can also show an Entropy map strip beside the hex rows for quick navigation through the file.

Read-Only Behavior

Hex data comparison is read-only:

Keyboard Cheatsheet

Action Shortcut
Move selection left
Move selection right
Move selection up or down ↑ / ↓
Extend byte selection ⇧ plus arrow keys
Switch to other pane
Move focus back from right pane or structure ⇧⇥
Expand selected structure row
Collapse selected structure row