UBJSON files and network payloads are compact but unreadable to the human eye. UBJSON to JSON decodes a Universal Binary JSON stream — markers, packed integers, typed containers, everything — into formatted JSON you can read, diff and paste into any tool.
UBJSON to JSON
Decode a Universal Binary JSON stream into readable JSON — packed integers, typed containers and all.
Everything runs locally in your browser — your UBJSON never leaves this page.
Hex and base64 input are detected automatically. When a file is loaded it wins over pasted text.
UBJSON markers understood
| Marker | Meaning | JSON output |
|---|---|---|
| i / U / I / l / L | int8 / uint8 / int16 / int32 / int64 | number (int64 beyond 2^53 stays a string) |
| d / D | float32 / float64 | number |
| S | string | string |
| C | char (1 byte) | 1-character string |
| H | high-precision number | number when safe, else string |
| T / F / N | true / false / null | true / false / null |
| Z | no-op (skipped) | — |
| { # $ } / [ # $ ] | optimized containers | object / array |
About UBJSON to JSON
Features
- Full marker support: i, U, I, l, L, d, D, S, C, H, T, F, N, Z.
- Optimized containers: counts (#) and element types ($) decoded correctly.
- Safe int64: numbers within 2^53; larger values become strings with a warning.
- Flexible input: upload a .ubj file, or paste hex or base64.
- Byte-accurate errors: unknown markers and truncation report the offset.
- Private: All decoding happens in your browser.
How to Use
- Upload a .ubj file or paste the bytes as hex or base64.
- Review the decoded JSON — every value, key and nesting level.
- Copy or download the JSON document.
Examples
Example 1 — Game logs. A developer captures UBJSON telemetry packets, decodes them here, and inspects player state as JSON.
Example 2 — IoT gateways. An engineer decodes sensor payloads received as UBJSON to verify field values and units.
Example 3 — Cached documents. A backend engineer retrieves a UBJSON document from a cache and decodes it to confirm what was stored.
Example 4 — Protocol debugging. A support engineer decodes a hex dump from a network trace to read the message body.
Benefits
- Instant: Files decode in the browser in milliseconds.
- Complete: Optimized forms and all numeric widths supported.
- Readable: int64 values never silently corrupt.
- Zero upload: Data never leaves your machine.
- No install: Works on any device with a browser.
Frequently Asked Questions
What is UBJSON?
Universal Binary JSON is a compact binary format with single-byte markers (i, U, I, l, L, D, S, T, F, N...). This tool decodes any standard UBJSON stream — including optimized containers with counts and types — back into readable JSON.
Which UBJSON features are supported?
All integer widths (int8, uint8, int16, int32, int64), float32 and float64, strings, chars, booleans, null, no-op markers, high-precision numbers, and optimized arrays and objects using the count (#) and type ($) markers.
How are large int64 values handled?
Values within the 2^53 safe-integer range become plain numbers. Larger values are kept as strings with a warning, so no precision is silently lost.
How do I provide the binary data?
Upload a .ubj file, or paste the bytes as hexadecimal or base64 text. Hex and base64 input are detected automatically.
What are the count and type markers?
Optimized UBJSON uses # to state how many elements follow (instead of a terminator) and $ to declare that all elements share one type. Both are decoded correctly.
Is my UBJSON uploaded anywhere?
No. Decoding happens entirely in your browser. Nothing is uploaded, stored or logged.