Skip to main content
Binary Internals is a Java toolkit that visualizes the internal byte-level structure of binary files. Each supported format is implemented as a self-contained plugin that receives the raw byte array and produces a navigable tree of named, annotated fields. When you open a file — either in the desktop viewer or via the HTTP API — the framework reads the file extension, looks up the matching PluginDescriptor, instantiates the corresponding parser class, and passes the file bytes to it. The result is a rich tree you can explore field by field, with hex offsets, lengths, and descriptions drawn directly from the format specification.

Supported Formats

Java .class

Parses the full JVM ClassFile structure: magic number 0xCAFEBABE, constant pool, access flags, fields, methods, and attributes. Supports class file versions up to Java 25 (version 69.0). Status: Stable.

ZIP Archive

Exposes Local File Headers, Central Directory Structures, and the End of Central Directory Record. Also handles .jar, .apk, .docx, and .xlsx files which are ZIP-based. Status: Stable.

BMP Bitmap

Parses the Bitmap File Header, DIB Header variants (BITMAPCOREHEADER through BITMAPV5HEADER), optional Color Table, and Pixel Array. Status: Stable.

JPEG Image

Marker-based parser covering SOI, APP0–APP15, DHT, DQT, SOFnn, SOS, EOI, COM, and restart markers. Status: Stable.

PNG Image

Chunk-based parser covering the 8-byte PNG signature plus IHDR, IDAT, IEND, PLTE, and all standard ancillary chunks. Status: Stable.

Android DEX

Parses the DEX header, string IDs, type IDs, proto IDs, field IDs, method IDs, and class definitions. Status: In Development.

ELF Binary

Parses the 16-byte ELF identification block and the 64-bit ELF header (Elf64_Ehdr). Only ELF64 is currently implemented. Status: In Development.

PDF Document

Parses the PDF file header, comments, indirect objects, cross-reference tables, and end-of-file markers. The module exists but is not listed in the README’s stable format set; treat it as experimental.

Format Status Summary

How Format Dispatch Works

Binary Internals uses a file-extension plugin model to route each opened file to the correct parser. Here is the flow from file open to rendered tree:
1

File extension extracted

When a file is opened — through the desktop GUI (File > Open…), the web interface, or the REST API (POST /api/v1/parse?name=Foo.class) — the framework extracts the lowercase file extension from the filename.
2

Plugin lookup

Each format module ships a PluginDescriptor implementation that declares which extensions it handles via getExtensions(). For example, PluginDescriptorClass returns ["class"] and PluginDescriptorDEX returns ["dex"]. The framework queries all registered descriptors to find a match.
3

Parser instantiated

The matched descriptor’s getFileFormatClass() method returns the concrete FileFormat subclass (e.g., ClassFile, ZIPFile, DexFile). The framework instantiates it, passing either a Path or a raw byte[].
4

Tree generated

The parser walks the byte array, creating structured FileComponent objects for each field or region. It then calls generateTreeNode() to build the Swing DefaultMutableTreeNode tree (or the equivalent JSON tree for the web API).
5

Interactive visualization

The user can click any node in the tree to see the byte offset, length, field name, and a human-readable description. For .class files, additional tabs display the constant pool, field list, method list, and (for Code_attribute nodes) disassembled bytecode.

Standalone Library Usage

Every format module — FormatCLASS.jar, FormatZIP.jar, FormatBMP.jar, FormatJPEG.jar, FormatPNG.jar, FormatDEX.jar, FormatELF.jar — can be used independently in your own Java project without pulling in the full viewer application. There are no third-party runtime dependencies beyond the JDK.
The BinaryInternalsWeb module exposes all format parsers over HTTP. Use GET /api/v1/formats to list the currently registered extensions and POST /api/v1/parse?name=<filename> to parse any supported file and receive the JSON tree in the response body.