Byte Array Compare
Compare two byte arrays or hex strings and list every offset where they differ, with a summary of the first difference and any length mismatch.
Paste two byte sequences - hashes, packets, file headers - to see exactly where and how they differ.
More Byte Array Tools
View all 17For comparing text line by line, a text diff is easier to read - this tool is for exact byte-level differences.
What Is Byte Array Compare?
It compares two byte sequences position by position and lists every offset where they differ, with both values in hex and as characters. A summary gives the number of differences, the first differing offset and any difference in length.
When to Use It
- Two hashes, signatures or keys should match but do not.
- A file or a network message is slightly different from the expected one.
- Checking which bytes an encoder, compressor or driver changed.
How to Use It
- Paste the first sequence in A and the second in B - hex, decimal, Base64 or code arrays.
- Leave the format on automatic detection, or set it for both inputs.
- Read the summary and the table of differing offsets.
Example
A = 89 50 4E 47 0D 0A 1A 0A 00 00 00 0D (a correct PNG start) and B = the same bytes with 0D missing. The result: 6 byte(s) differ, A is 12 bytes and B is 11, first difference at offset 4. This is the classic sign of a PNG damaged by a text-mode transfer that turned \r\n into \n.
Understanding the Output
The comparison is by position. When a byte is inserted or removed, everything after it shifts, so all following positions differ - look at the first difference to find the cause.
Limitations
The tool does not re-align sequences after an insertion the way a text diff does, and the table lists the first 1,000 differences. To view a whole file, use the Hex Viewer; to compare hashes of large files, hash them first with the SHA-256 Generator.
Frequently Asked Questions
Explore More Tools
Keep going with related categories and our most used tools.