Reading a hex dump
A hex dump shows a file as it really is: a sequence of bytes. Each line has three columns. The offset on the left is the position of the first byte on that line, in hex. The middle shows each byte as two hex digits. The right column shows the same bytes as ASCII characters, with a dot for anything that is not printable. The format is the same one xxd, hexdump -C and od -A x -t x1z print.
Magic bytes
Most file formats start with a fixed signature, which is how tools identify them regardless of the file extension:
| First bytes | ASCII | Format |
|---|---|---|
| 89 50 4E 47 0D 0A 1A 0A | .PNG.... | PNG image |
| FF D8 FF | ... | JPEG image |
| 47 49 46 38 | GIF8 | GIF image |
| 25 50 44 46 | ||
| 50 4B 03 04 | PK.. | ZIP (also DOCX, XLSX, JAR, APK) |
| 1F 8B | .. | gzip |
| 7F 45 4C 46 | .ELF | Linux executable |
| 4D 5A | MZ | Windows executable (EXE, DLL) |
| CA FE BA BE | .... | Java class file / Mach-O fat binary |
| EF BB BF | ... | UTF-8 byte order mark (text file) |
| 53 51 4C 69 74 65 | SQLite | SQLite database |
Things a hex dump reveals
- Line endings:
0Ais Unix (LF),0D 0Ais Windows (CRLF). - A BOM (
EF BB BF) at the start of a “plain” text file, which breaks some parsers. - Invisible characters: non-breaking spaces (
C2 A0), zero-width joiners (E2 80 8D), smart quotes (E2 80 9C), which look like ordinary characters in an editor. - Trailing whitespace and NUL padding at the end of fields.
Questions
What is the difference between xxd and hexdump?
They show the same information in slightly different layouts. xxd groups bytes in pairs and is reversible (xxd -r rebuilds the file); hexdump -C uses single bytes with a | around the ASCII column. This viewer follows the hexdump -C layout.
Why are some characters shown as dots?
Bytes outside the printable ASCII range (32–126) have no single visible character, so they are drawn as a dot in the right column. The hex column still shows the real value.
Can I edit the bytes here?
Not in this version; it is a viewer. For editing, use a hex editor such as hexedit, ImHex or the Hex Editor extension for VS Code.
Is there a size limit?
Files up to 8 MB are accepted, and the first 64 KB are rendered so the page stays fast. The file type is detected from the first bytes.
Is my file uploaded?
No. The browser reads it locally with the File API and the dump is produced in JavaScript on your machine.