File inspection guides

Find a byte pattern that crosses a hex-viewer page

·

A long binary file is easier to inspect when you know the offset of a byte sequence. Use this example to see how a match can begin in the last row of one page and finish in the first row of the next.

Hex Viewer

Find the pattern across two pages

Choose Load boundary example to open boundary-example.bin. In Hexadecimal bytes mode, enter DE AD BE EF and choose Find bytes. The first of two matches starts at decimal offset 1,022, or 0x3FE.

The last two bytes on page 1 are DE AD. Select Next page to see BE EF at offsets 1,024 and 1,025. Both parts receive the same match highlight on their own pages. Select Next match to jump to the second sequence at 1,537 (0x601).

W3C File API — Blob sliceRFC 4648 — Base16

Compare hex with printable ASCII

Enter 0x04 in Jump to offset and choose Go to byte. The selected byte is C3, or 195 in decimal. In UTF-8 text mode search for é. Its two-byte sequence C3 A9 starts at offset 4.

The printable ASCII column shows dots for those two bytes. Compare the first byte, 41, which the same column shows as A. The ASCII view helps you browse byte values. It uses the printable single-byte range.

RFC 20 — ASCII format for network interchangeWHATWG Encoding Standard — TextEncoder

Match the offset in a saved dump

Return to page 1 and choose Download visible dump. Open hex-page-1.txt and find the last row, labeled 000003F0. Its final two groups are DE AD. Page 2 begins at 00000400 and starts with BE EF.

Find bytes scans from offset zero by default. To repeat a dense search after the first 2,000 results, enter a later start offset and search again.

W3C File API — Blob sliceRFC 4648 — Base16

Common questions

Can I jump to byte zero?

Yes. Enter 0 or 0x0 to select the first byte. It appears on the first page.

What if a file uses another text encoding?

Switch to Hexadecimal bytes and enter the byte sequence for that encoding. UTF-8 text mode always encodes the supplied query as UTF-8.

Sources

Put it into practice.

Related guides