Skip to content
UniKit

Hex viewer

Drop any file to inspect a hex + ASCII view with paging, byte and text search, magic-byte identification, and real PNG / JPEG / GIF / PDF / ZIP / GZIP structure parsing.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Choose a file

Drop a file here

The file is read locally in your browser and never uploaded.

You can also drop a file onto the area below.

The sample is a real 1×1 PNG (67 bytes) used to demo the structure parser.

Hex view

Three columns: offset, hex bytes, printable characters (non-printable shown as a dot).

Pick a file to see its hexadecimal content and structure.

What this tool does

  • Debug damaged files or rewritten headers: look at the real bytes, then cross-check the magic bytes and the structure list.
  • Learn or verify container formats: PNG chunks, JPEG segments, ZIP local file headers and GZIP header fields are listed with their offsets, and clicking one highlights its byte range.
  • Check locally whether a downloaded file really is the type it claims to be (a mismatch between extension and file header is obvious).
  • Search a binary file for a byte sequence or text, for example the IDAT chunk inside a PNG or the PK header inside a ZIP.

Example

Input

1F 8B 08 08 00 10 5E 5F 00 03 61 2E 74 78 74 00 78 9C 01 02 03 DE AD BE EF 07 00 00 00

Output

format: gzip
segments: 4
truncated: no
compression-method: 8 (deflate)
flags: 0x08 (FNAME)
mtime: 1600000000 (2020-09-13T12:26:40.000Z)
os: 3 (Unix)
original-filename: a.txt
isize: 7
0x00000000 HEADER (10 bytes) magic=1F 8B compression-method=8 flags=0x08 mtime=1600000000 extra-flags=0 os=3
0x0000000A FNAME (6 bytes) original-filename=a.txt
0x00000010 DEFLATE_DATA (5 bytes) compressed-bytes=5
0x00000015 TRAILER (8 bytes) crc32=0xEFBEADDE isize=7

Save these 26 bytes as sample.gz and drop the file in to get exactly this summary (the payload is not a valid deflate stream, but the tool does not decompress, so parsing is unaffected).

Frequently asked questions

Which file structures can it parse?

Six containers are parsed for real: PNG (IHDR/IDAT/IEND chunk chain with lengths), JPEG (SOI/APPn/DQT/SOFn/DHT/SOS/EOI segment list), GIF (version, logical screen descriptor, global colour table, graphic control extension, image descriptor, trailer), PDF (header version, object start offsets, xref, trailer, startxref, %%EOF), ZIP (local file header entries: name, method, original/compressed size, CRC32) and GZIP (header fields, FEXTRA/FNAME/FCOMMENT/FHCRC, data area and CRC32/ISIZE trailer). Other formats get the hex view, search and magic-byte matching only.

Does it decompress or decode the image data?

No. It only splits structure units per the public specs and reads header fields. CRC32 values are not verified, deflate/zlib data is not inflated, pixels are not reconstructed and LZW is not decoded. A readable structure therefore does not prove the file is intact.

Is my file uploaded anywhere?

No. The browser FileReader reads the file into a byte array locally and the parsing is a pure function, so there is no network request. To bound memory, at most the first 4 MiB of a file are read; anything beyond that is reported as truncated.

How does magic-byte identification work?

A table of published file-header signatures is matched, including signatures at non-zero offsets such as MP4 ftyp and TAR ustar. Results are sorted by matched bytes, then signature length, then offset, and at most five are listed. The table covers common formats, not every format in existence.

What syntax does the search box accept?

Hex mode accepts spaces, commas and colons as separators plus 0x or \x prefixes (for example 50 4B 03 04). Text mode searches UTF-8 bytes, case-insensitively by default with a case-sensitive switch. At most 200 matches are listed, while the counter always reports the total number of matches.

Keywords:hex viewerhex dumpmagic bytes

Related tools