Overview
Introduction
A hexdump is the standard way developers look at exactly what bytes make up a file or string, side by side with a readable ASCII rendering, without any of a text editor's encoding assumptions getting in the way.
This tool reproduces the classic hexdump -C / xxd field layout, offset, hex byte pairs, ASCII column, for any text you type or any file you upload, entirely client-side.
What Is Hexdump Generator?
A hexdump is a byte-level view of data: each row shows the offset of its first byte (as an 8-digit hex number), then that row's bytes as two-digit hex pairs (16 per row here), then those same bytes rendered as ASCII characters where printable.
It's a read-only display format, distinct from a hex editor, which shows the same information but also lets you change byte values.
How Hexdump Generator Works
Input text is UTF-8 encoded into bytes (or an uploaded file's bytes are read directly via the File API), then split into 16-byte rows.
Each row is formatted as its starting offset, the 16 bytes as lowercase two-digit hex pairs (padded with blank space for a short final row), and the ASCII column with '.' standing in for any byte outside the printable range 0x20-0x7E.
A final line shows the total byte length as an offset, matching the convention hexdump -C uses to mark the end of the dump.
When To Use Hexdump Generator
Use it to inspect exactly what bytes are in a file or string when debugging an encoding issue, a file format, or an unexpected character.
It's a fast way to check a file's magic number/header bytes, confirm a text file's exact line-ending bytes, or verify there's no unexpected BOM or trailing null bytes, without opening a terminal.
Often used alongside Hex Editor and Hex Bytes to File Converter.
Features
Advantages
- Matches the well-known hexdump -C / xxd field layout, so the output is instantly familiar to anyone who has used those tools.
- Works on both typed/pasted text and real uploaded files.
- Runs entirely in the browser; nothing you upload or type is sent anywhere.
Limitations
- Read-only: there's no way to edit bytes here (use the Hex Editor tool for that).
- Capped at 64 KB of displayed bytes; larger files are truncated with an on-screen note.
- Exact inter-byte spacing is a simplified approximation of hexdump -C's formatting, not a guaranteed byte-for-byte match to that or any other specific CLI tool's output.
Examples
Best Practices & Notes
Best Practices
- Use the file upload mode when you need the exact bytes on disk; text mode UTF-8 encodes first, which changes the byte count for any non-ASCII character.
- Compare the final total-length line against the file size you expect, as a quick sanity check that nothing was truncated.
- Reach for the Hex Editor tool instead if you actually need to change a byte, not just view it.
Developer Notes
Rows are built by slicing the byte array into 16-byte chunks, hex-encoding each byte with `toString(16).padStart(2, "0")`, and rendering the ASCII column with a printable-range check (0x20-0x7E); the closing offset line mirrors hexdump -C's convention of showing the total length as a final bare offset.
Hexdump Generator Use Cases
- Debugging an unexpected character or encoding issue in a text file
- Checking a file's magic number or header bytes without a terminal
- Confirming exact line-ending bytes (CRLF vs LF) in a text file
- Teaching how text and binary data map to raw bytes
Common Mistakes
- Expecting this tool to let you edit bytes; it's read-only by design (see the Hex Editor tool for editing).
- Not realizing text mode UTF-8 encodes first, so a single non-ASCII character can span multiple bytes in the dump.
- Assuming the spacing matches a specific hexdump/xxd binary's output exactly, byte for byte.
Tips
- Use the ASCII column to quickly spot a recognizable string before hunting for its exact offset in hex.
- For files near or over the 64 KB cap, a desktop tool may be needed to see the rest of the dump.