A hex diff tool compares two binary files or hex strings byte by byte and shows every changed, added, or removed byte in classic hex dump format with ASCII side panel. Ideal for comparing firmware builds, binary patches, or any files where character-level diff is insufficient.
File A (Original)
File B (Modified)
Side-by-Side Hex Dump
How to Use the Hex Diff Tool
Binary file comparison requires a different approach than text diff. Two firmware images might differ by a single byte at offset 0x1A3C, or a compiled executable might change in dozens of scattered locations after a recompile. This hex diff tool shows exactly which bytes changed, were inserted, or were removed — all aligned in the standard hex dump format.
Step 1: Provide Two Inputs
You have two options per file. Upload a binary file using the drop area — the tool reads it entirely in your browser via the FileReader API. Alternatively, paste a hex string directly: space-separated byte values like 4D 5A 90 00, or a continuous string like 4d5a9000. Both uppercase and lowercase hex digits are accepted.
Step 2: Reading the Hex Dump Output
Each row in the hex dump shows 16 bytes. The leftmost column is the byte offset in hex (e.g., 0x0020 = byte 32). The middle section shows each byte as two hex digits. The right column is the ASCII representation where printable characters are shown and non-printable bytes appear as dots. Yellow bytes are changed, green are added, red are removed.
Understanding the Diff Statistics
The stats bar shows the total bytes compared, how many are changed, added, removed, and the overall percent difference. A high percent difference means the files are structurally different (e.g., different builds). A low percent difference with a few scattered changes suggests targeted modifications — patches, version numbers, or checksums.
Common Use Cases
Use the hex diff to compare firmware versions to find changed instruction bytes, verify that a binary patch applied correctly to a file, compare compiled executables to see what a code change produces at the binary level, or inspect image file metadata differences that text tools cannot detect.
FAQ
Is the hex diff tool free?
Yes, completely free with no account required. All comparison runs locally in your browser using JavaScript — your binary files and hex data are never uploaded or stored anywhere.
Can I compare binary files with this tool?
Yes. Use the Upload File buttons to load binary files directly. The tool reads them via the FileReader API in your browser and converts them to byte arrays for comparison. No files are sent to any server.
What file size limit does the hex diff support?
The tool compares up to 64KB (65,536 bytes) from each input for performance. If your files are larger, it shows the first 64KB of each and displays a warning. For typical firmware files, executables, or binary patches this limit is sufficient.
How do I paste a hex string?
Paste space-separated bytes like 4D 5A 90 00 or 4d5a9000 (no spaces). The tool accepts uppercase and lowercase hex digits. You can also paste hex output from xxd, hexdump, or any other hex editor — just make sure each byte is two hex digits.
What do the colors mean in the hex dump?
Yellow bytes are changed — the byte exists in both files but has a different value. Green bytes are present only in the right file (added). Red bytes exist only in the left file (removed). Gray bytes are identical in both files.
How does the hex dump format work?
Each row shows 16 bytes. The leftmost column is the byte offset in hexadecimal (e.g., 0x0010 = byte 16). The middle section shows the hex values of the 16 bytes. The rightmost column shows the ASCII representation — printable characters are shown, non-printable bytes appear as a dot.