Hex Viewer: Read Any File Like a Machine Does — A Practical Guide to Hex Dumps
Learn how to use the Hex Viewer to inspect text, hex strings, and binary files as a classic hex dump with offset, byte, and ASCII columns — plus how to actually read one.
Table of Contents
Every file on your computer — every image, executable, font, and database — is ultimately a long sequence of bytes. Text editors show you an interpretation of those bytes; a hex dump shows you the truth. If you have ever wondered what a PNG signature looks like, why a JSON file refuses to parse, or what is hiding inside a suspicious attachment, a hex dump is the fastest way to find out.
The Hex Viewer from Online Tools Forge renders any text, hex string, or binary file as a classic hex dump with offset, byte, and ASCII columns. You can search inside the dump, copy the hex output, and download the result — and because everything runs entirely in your browser, your file never leaves your machine.
In this guide, we will walk through how the tool works, how to read a hex dump like a pro, and the real-world situations where byte-level inspection saves the day.
Why Use the Hex Viewer?
- Zero-upload privacy. The tool processes everything client-side with JavaScript. Your binary files, API payloads, and proprietary data never touch a server — critical when inspecting sensitive material.
- Three input modes in one place. Paste plain text to see its UTF-8 bytes, paste a raw hex string to decode and reformat it, or drop in an entire binary file (up to 1 MB) to get an instant dump.
- The classic three-column layout. Offset, hexadecimal bytes, and ASCII side by side — the same format used by xxd, hexdump, and hex editors for decades, so dumps you copy are instantly recognizable to other developers.
- Built-in search. Hunt for a specific hex byte sequence like CA FE or a text string like PK, with a match count so you know exactly how many hits exist and where.
- Copy and export options. Copy just the hex column, copy the entire formatted dump, or download it as a file for bug reports and documentation.
- Adjustable rows. Change the bytes-per-row setting to match whatever tool or convention your team uses — 8, 16, or anything in between.
Key Features
| Feature | What it does |
|---|---|
| Text mode | Pastes text and renders its UTF-8 bytes as a hex dump |
| Hex mode | Accepts a raw hex string (e.g. 48 65 6C 6C 6F) and formats it into a dump |
| File mode | Uploads any binary file and dumps up to 1 MB in-browser |
| Search | Finds hex byte sequences or plain text inside the dump, with match count |
| Copy / Download | Copies the hex string or full dump; downloads the dump as a file |
| Adjustable row size | Changes how many bytes appear per row (default 16) |
A few details worth knowing: the 1 MB safety cap keeps rendering fast even on large files, since drawing thousands of rows in the DOM is expensive. The ASCII column shows printable characters as-is and replaces control bytes with a dot, exactly like command-line hexdump tools. And because parsing happens locally, results appear instantly — no round trip, no queue.
How to Use
- Open the Hex Viewer and pick an input mode: Text, Hex, or File.
- Provide your input — type or paste text, paste a hex string, or upload a binary file.
- Read the dump: the left column is the byte offset, the middle is hexadecimal, the right is ASCII.
- Use the search box to find a hex sequence (like 0D 0A) or a text string; matches are highlighted with a count.
- Copy the hex output, copy the whole dump, or download it — then adjust bytes-per-row if you need a different layout.
Understanding Hex Dumps
A hex dump looks intimidating at first, but it follows one simple pattern. Here is a real row:
00000000 48 65 6C 6C 6F 2C 20 57 6F 72 6C 64 21 0A 00 3F |Hello, W..orld!?.|
The offset column. The leftmost number (00000000) is the position of the first byte on that row, counted from the start of the data. Row two starts at 00000010 — which is 16 in decimal, since hex 10 = 16. Offsets are hexadecimal, so after 0000000F comes 00000010. This lets you jump straight to a byte at a known position without counting.
The hex column. Each byte is shown as two hexadecimal digits, from 00 to FF (0–255 decimal). Sixteen bytes per row is the universal convention, usually split into two groups of eight for readability. Programmers often prefix hex values with 0x, so 0x48 is the same byte as 48 here — decimal 72, which is the ASCII code for H.
The ASCII column. The right column renders each byte as a character when it is printable, and as a dot when it is not. 48 becomes H, but 0A (a newline) and 00 (null) appear as dots. This column is your best friend: human-readable fragments jump out immediately, letting you spot strings, labels, and structure inside an otherwise opaque binary.
Multi-byte characters. If you paste text containing characters beyond basic ASCII — accented letters, emoji, or Thai script — UTF-8 encodes each one as two, three, or four bytes. The Thai character ก, for example, occupies three bytes (E0 B8 81) and shows up as three dots in the ASCII column. Seeing this is the quickest way to understand why "one character" is not always "one byte."
Practical Use Cases
Identifying file types by magic bytes
File extensions lie; magic bytes do not. A Java class file starts with CA FE BA BE, a ZIP (or any ZIP-based format like DOCX and JAR) starts with 50 4B 03 04 (PK), and a PNG starts with 89 50 4E 47. Open a mystery file in the Hex Viewer and the first row usually tells you what it really is — invaluable when a downloaded file has the wrong extension or a corrupted header.
Debugging encoding and invisible characters
A CSV that "looks fine" but breaks your parser often has hidden culprits: a UTF-8 BOM (EF BB BF) at the start, Windows-style CRLF line endings (0D 0A) mixed with Unix LF (0A), or trailing null bytes from a bad export. Searching the dump for 0D or EF BB BF finds them in seconds, where a text editor would show nothing at all.
Inspecting network payloads and protocols
When you capture raw TCP, WebSocket, or BLE traffic, the payload arrives as bytes. Pasting a hex payload into the Hex Viewer lets you read protocol fields, spot ASCII fragments (hostnames, tokens, error messages), and correlate byte positions with your protocol spec — a routine task in network debugging and IoT development.
CTF challenges and security analysis
Capture-the-flag competitions frequently hide data inside files: text appended after a PNG's end marker, strings obfuscated with XOR, or structure inside an unknown blob. A hex dump is the standard first step. Because the tool runs in-browser with no upload, it is also safe for inspecting malware samples or confidential files you should not hand to a random web service.
Best Practices
- Check the first 16 bytes first. Magic numbers live at the start of a file; one row is often enough to identify the format.
- Use hex search for bytes, text search for strings. Searching 0D 0A finds CRLF pairs; searching error finds readable messages embedded in a binary.
- Count from zero. Offsets start at 00000000, so byte "at offset 5" is the sixth byte. Mixing this up is the most common hex-dump mistake.
- Remember one byte = two hex digits. A gap in a hex string usually means a missing digit, not a missing byte — validate input length if a parse fails.
- Respect the 1 MB cap. For huge files, dump a slice (for example with head -c on the command line) and inspect the interesting region in the browser.
- Keep dumps out of tickets when they contain secrets. A hex dump of a config file or key material is as sensitive as the original — redact before sharing.
Conclusion
Byte-level literacy is a quiet superpower: it turns "this file is broken" into "this file has a BOM at offset 0 and mixed line endings." The Hex Viewer makes that skill accessible with no install, no upload, and no cost — paste anything in and see exactly what the machine sees.
Next time a file misbehaves, skip the guessing. Open the Hex Viewer, read the first row, and let the bytes tell you the story.
Related Tools You Might Like
- Base64 Encoder/Decoder — convert between raw data and Base64 when you need a transport-safe text representation.
- ASCII Table Reference — look up decimal, hex, octal, and binary values for every ASCII character.
- File Hash Checker — verify file integrity with MD5, SHA-1, and SHA-256 checksums.
Happy inspecting!