BXML to XML Converter
Convert BXML (Binary XML) files to human-readable XML format instantly in your browser. Client-side, private, no upload required.
About
BXML (Binary XML) is a compact binary encoding of XML documents used in game engines, embedded systems, and data-interchange pipelines where parsing speed and file size matter more than human readability. The format replaces verbose tag names and attribute keys with integer indices into a string table, strips whitespace, and packs values into typed binary fields. Without a decoder, BXML files are opaque byte streams. This tool reconstructs the original XML document tree from the binary representation, restoring tag names from the string table, re-serializing attributes, and producing properly indented, valid XML output. All processing occurs client-side in your browser - no data is transmitted to any server.
The parser handles multiple BXML variants by inspecting magic bytes and header structure. It supports string-table-indexed tags, inline UTF-8 text nodes, nested element hierarchies, and CDATA sections. Limitations: proprietary BXML schemas with encryption or custom compression layers (e.g., LZ4-wrapped payloads) are not supported without prior decompression. The reconstructed XML preserves document structure but not original whitespace or comment placement, as these are typically discarded during binary encoding. For files exceeding 5 MB, processing is offloaded to a background thread to keep the interface responsive.
Formulas
BXML decoding follows a deterministic binary read sequence. The file begins with a header, followed by a string table, then a recursive node tree.
Header → magic (4 bytes) + version (2 bytes) + stringTableOffset (4 bytes) + stringTableSize (4 bytes) + nodeTreeOffset (4 bytes)
StringTable → count (4 bytes) + [ offseti (4 bytes) ]i=0..count + UTF-8 blob
Node → type (1 byte) + nameIdx (4 bytes) + attrCount (2 bytes) + [ Attr ]attrCount + childCount (4 bytes) + [ Node ]childCount
Attr → keyIdx (4 bytes) + valueType (1 byte) + value (variable)
Where nameIdx and keyIdx are zero-based indices into the string table. valueType determines how the value field is read: 0x01 = string index (4 bytes), 0x02 = int32 (4 bytes), 0x03 = float32 (4 bytes), 0x04 = boolean (1 byte). Node type 0x01 = element, 0x02 = text, 0x03 = CDATA. The reconstructed XML indentation depth d produces d × indentSize leading spaces per line.
Reference Data
| Feature | BXML (Binary XML) | XML (Text) |
|---|---|---|
| Encoding | Binary (typed fields) | UTF-8 / UTF-16 text |
| Human Readable | No | Yes |
| Typical Size Ratio | 0.3× - 0.6× of XML | 1.0× (baseline) |
| Parse Speed | Fast (no tokenization) | Slower (requires lexer) |
| String Storage | Indexed string table | Inline repetition |
| Attribute Values | Typed (int, float, bool, string index) | Always string |
| Whitespace | Stripped | Preserved |
| Comments | Usually discarded | Preserved |
| CDATA Sections | Flagged by type byte | Delimited by <![CDATA[ |
| Namespace Support | Via string table prefix | Native xmlns |
| Common Magic Bytes | 0x42 0x58 0x4D 0x4C ("BXML") | <?xml |
| Schema Validation | Not embedded | DTD / XSD references |
| Typical Use Cases | Game assets, IoT configs, caches | Web services, configs, documents |
| Streaming Parse | Yes (sequential reads) | SAX / StAX |
| Compression | Inherent (compact encoding) | Requires gzip / brotli |
| Max Nesting Depth | Limited by stack / spec | Unlimited (spec) |
| Endianness | Little-endian (typical) | N/A |
| Boolean Encoding | 0x00 / 0x01 | true / false |
| Float Encoding | IEEE 754 (4 or 8 bytes) | Decimal string |
| Integer Encoding | Fixed-width or varint | Decimal string |
| File Extension | .bxml, .bin | .xml |