Introduction
A hexdump is a human-readable representation of binary data that shows each byte's offset, hexadecimal value, and ASCII character side by side. The `hexdump -C` format from BSD, also available as `xxd` on Linux, is the de facto standard for inspecting file headers, network packets, encoded blobs, and any data that is not plain text. This tool renders binary input in the classic `hexdump -C` layout entirely in your browser, with no data sent to a server.
What this tool does
- Renders binary data in the BSD `hexdump -C` layout: 8-digit offset, 16 bytes per line split into two 8-byte groups, and an ASCII column.
- Accepts input as UTF-8 text, raw hex, or base64.
- Shows non-printable bytes as dots in the ASCII column, matching `hexdump -C`.
- Updates the dump in real time as you type, with a copy-to-clipboard button.
- Processes all data locally in your browser with no network requests.
How this tool works
Choose an input format (text, hex, or base64) and paste your data. The tool converts the input to a `Uint8Array` and walks it 16 bytes at a time. For each line it prints the zero-based offset as an 8-digit hex number, the 16 bytes as two space-separated 8-byte groups, and the ASCII representation with bytes outside the printable range (0x20–0x7e) replaced by dots. All computation runs client-side using a pure JavaScript implementation.
How a hexdump works
The hexdump format originated in BSD Unix as the `hexdump` utility, with the `-C` flag producing the canonical 'canonical hex+ASCII' display. The GNU equivalent is `xxd`, which uses a slightly different offset width. The layout solves a concrete problem: binary data cannot be read directly, but a side-by-side hex and ASCII view lets an engineer spot text fragments inside binary formats (such as `PK` in a ZIP file, `PNG` in a PNG, or `-----BEGIN` in a PEM key) while also seeing the exact byte values. The 16-byte line width matches the typical terminal width and aligns nicely with 8-byte (64-bit) machine words, which is why the bytes are split into two groups of 8.
How to use this tool
- Pick an input format: Text (UTF-8), Hex, or Base64.
- Paste your data into the input field.
- The hexdump appears instantly in the output area.
- Use Copy to copy the dump to your clipboard.
- Change the input or format at any time; the dump updates automatically.
Real-world examples
Inspecting a PNG header
Input (hex): `89504e470d0a1a0a0000000d49484452`. The dump shows the ASCII column reading `.PNG....IHDR`, confirming the file is a PNG and revealing the IHDR chunk marker.
Looking for text in a binary blob
Input (base64): a certificate payload. The ASCII column highlights `-----BEGIN CERT` even though the surrounding bytes are non-printable, helping you locate the embedded PEM.
Empty input
Input: empty string. The tool prints `(empty input)` so the output area is never blank and confusing.
Comparison with similar methods
| Method | Complexity | Typical use |
|---|---|---|
| hexdump -C | O(n) — one pass | BSD default, file headers, packet inspection |
| xxd | O(n) — one pass | GNU default, Vim integration, patching binaries |
| od -A x -t x1z | O(n) — one pass | POSIX portable dump, scripting |
| Hex Fiend / HxD | O(n) — GUI | Interactive hex editing, large files |
Limitations or considerations
This tool processes the entire input in memory and is intended for payloads up to a few hundred kilobytes. Very large files may freeze the tab. The dump uses the BSD `hexdump -C` layout; if you need the `xxd` layout (different offset width, no grouping) use a dedicated `xxd` tool. The ASCII column uses the 0x20–0x7e printable range; bytes outside that range are shown as dots, which matches `hexdump -C` but differs from some tools that render extended ASCII.
Frequently asked questions
What is the difference between hexdump and xxd?
`hexdump -C` is the BSD utility that produces the canonical hex+ASCII layout with an 8-digit offset and two 8-byte groups. `xxd` is the GNU/Vim equivalent with a slightly different offset width and no grouping. Both show the same byte values; only the formatting differs.
Why are some bytes shown as dots in the ASCII column?
Bytes outside the printable ASCII range (0x20 to 0x7e) are replaced by dots so that control characters and high-bit bytes do not corrupt the layout. This matches `hexdump -C` behavior.
Can I edit the bytes in the dump?
No. This tool is a viewer, not an editor. For interactive editing use a desktop hex editor such as Hex Fiend (macOS), HxD (Windows), or Bless (Linux).
How large an input can I dump?
The tool processes the entire input in memory, so payloads up to a few hundred kilobytes work well. Very large files may freeze the browser tab because the dump is rendered as a single string.
Conclusion
The hexdump viewer gives you a fast, browser-based way to inspect binary data in the classic BSD `hexdump -C` layout. With text, hex, and base64 input modes, real-time rendering, and a fully client-side implementation, it is a handy tool for examining file headers, network payloads, and encoded blobs without installing anything.