Logo

MonoCalc

/

Binary File Viewer

Encode/Decode

Drop a file here or click to browse

Any binary file · up to 50 MB · processed entirely in your browser

About This Tool

🔬 Binary File Viewer – Inspect Raw Bytes in Any Format

The Binary File Viewer is a browser-based tool that lets you inspect the raw bytes of any file without installing software. Upload a binary file and instantly see every byte rendered as hexadecimal, octal, decimal, or binary — all in a classic hex-editor-style layout with an ASCII panel on the right. Nothing leaves your browser; all processing happens locally using the FileReader API and typed arrays.

📋 Display Modes

Switch between four per-byte representations instantly without re-uploading the file:

ModeExample (byte 255)WidthBest For
HexFF2 charsGeneral debugging, protocol analysis
Octal3773 charsUnix permissions, legacy systems
Decimal2553 charsVerifying integer byte values
Binary111111118 charsBit flags, bitmasks, bitfield analysis

🔍 Magic Bytes & File-Type Detection

The viewer automatically reads the first 16 bytes and compares them against a library of 40+ file signatures — known as magic bytes. A badge near the file name instantly shows the detected type (e.g., PNG Image or ZIP Archive). This is especially useful when a file has been renamed or its extension has been stripped.

Common signatures detected:

Magic Bytes (hex)File Type
89 50 4E 47 0D 0A 1A 0APNG Image
FF D8 FFJPEG Image
25 50 44 46PDF Document
50 4B 03 04ZIP / JAR / DOCX Archive
7F 45 4C 46ELF Binary (Linux executable)
4D 5AWindows PE Executable (EXE/DLL)

🔎 Byte Pattern Search & Highlighting

Enter any hex pattern — for example FF D8 FF for a JPEG marker or DE AD BE EF for a common sentinel value — to locate every occurrence in the file. All matching bytes are highlighted in yellow across the hex dump, and the total match count is shown next to the search bar. The viewer automatically navigates to the page containing the first match.

🧮 Value Inspector

Click any byte cell in the dump to open the Value Inspector, which decodes the bytes starting at that offset as every common C/C++ data type — in both little-endian and big-endian byte order:

int8 / uint8 — single-byte signed and unsigned

int16 / uint16 — 2-byte short integers

int32 / uint32 — 4-byte integers

float32 — 4-byte IEEE 754 single precision

float64 — 8-byte IEEE 754 double precision

uint64 — 8-byte unsigned 64-bit integer

This is essential for reading binary file headers — such as image width/height fields, audio sample rates, or length-prefixed protocol messages.

⚙️ How Byte Conversions Work

Each byte is a number between 0 and 255. The tool formats it differently per mode using JavaScript's built-in Number.prototype.toString(base):

// Hex:     byte 65 → "41"
(65).toString(16).padStart(2, '0').toUpperCase()

// Octal:   byte 65 → "101"
(65).toString(8).padStart(3, '0')

// Decimal: byte 65 → " 65"
(65).toString(10).padStart(3, ' ')

// Binary:  byte 65 → "01000001"
(65).toString(2).padStart(8, '0')

📄 Page Navigation for Large Files

To keep the browser responsive, the viewer renders 4,096 bytes per page. For files larger than 4 KB, Prev / Next buttons let you navigate through pages. The footer of the dump shows the exact byte range currently visible (e.g., Showing bytes 0–4,095 of 24,908).

🎨 Byte Color Coding

Bytes are color-coded for quick visual scanning:

Default — printable ASCII characters (0x20–0x7E)

Orange — non-printable control characters (0x01–0x1F, 0x7F)

Blue — high bytes ≥ 0x80 (extended/binary data)

Gray — null bytes (0x00)

Yellow highlight — pattern search matches

📤 Export Options

Use Copy Hex to copy the current page's raw hex bytes to your clipboard as a space-separated string. Use Export to download a .hex.txt file containing the full xxd-style dump of the entire file — useful for sharing, code review, or offline analysis.

Frequently Asked Questions

Is the Binary File Viewer free?

Yes, Binary File Viewer is totally free :)

Can I use the Binary File Viewer offline?

Yes, you can install the webapp as PWA.

Is it safe to use Binary File Viewer?

Yes, any data related to Binary File Viewer only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

What is a Binary File Viewer and what can I use it for?

A Binary File Viewer lets you inspect any file's raw bytes in a structured, readable layout — similar to the xxd or hexdump -C command. It is useful for debugging binary protocols, examining file headers (magic bytes), reverse-engineering binary formats, verifying serialized data, and understanding bit-level patterns without needing a desktop hex editor.

How does this tool work?

Upload any file (up to 50 MB) or paste hex text directly. The tool reads the bytes entirely in your browser using the File API and Uint8Array — nothing is sent to a server. It then renders the bytes in your chosen display mode (Hex, Octal, Decimal, or Binary) alongside their printable ASCII characters. Page navigation lets you scroll through large files efficiently.

What display modes are available?

There are four modes: Hex (two-digit hexadecimal, e.g. FF), Octal (three-digit octal, e.g. 377), Decimal (three-digit decimal, e.g. 255), and Binary (eight-bit binary, e.g. 11111111). You can switch modes instantly without re-uploading the file.

What are magic bytes and how does file-type detection work?

Magic bytes are fixed byte sequences at the beginning of a file that identify its format — for example, PNG files always start with 89 50 4E 47. The viewer compares the first 16 bytes against a library of 40+ file signatures and displays the detected type as a badge. This helps when a file lacks an extension or has been renamed.

How do I search for a specific byte pattern?

Enter a hex string in the Pattern Search field — for example FF D8 FF for a JPEG header or 50 4B 03 04 for a ZIP local file entry. The tool highlights all matching bytes in the dump and lists the offsets where each match was found. Spaces in the input are optional; both FF D8 FF and FFD8FF are accepted.

What does the Value Inspector show?

Clicking any byte in the dump opens the Value Inspector, which decodes the bytes at that offset as int8, uint8, int16, uint16, int32, uint32, float32, and float64 — in both little-endian and big-endian byte order. This is invaluable when reading multi-byte fields like image dimensions, audio sample rates, or protocol length prefixes.