EditSafely

Convert JSON to UBJSON

Convert a JSON file to Universal Binary JSON (UBJSON). Runs entirely in your browser, so your data never leaves your device.

0 chars · 0 lines

Output

The result appears here as you type.

How to use Convert JSON to UBJSON

  1. 1. Paste your JSON. Paste the JSON object or array you want serialized to Universal Binary JSON, a compact binary format that mirrors JSON's own data model exactly, including precise number types.
  2. 2. Review how the encoding works. There are no settings to configure: the tool writes each value with a type marker byte followed by its binary data, distinguishing integers, floats, strings and containers explicitly.
  3. 3. Download the UBJSON file. Download the produced binary file from the output panel and use it wherever UBJSON is expected, such as a game engine's asset pipeline or a compact data interchange format.

When to use Convert JSON to UBJSON

Convert JSON to UBJSON serializes a JSON document into Universal Binary JSON, a binary format designed to be smaller and faster to parse than text JSON while preserving the exact same data model, including distinct integer and floating-point types.

  • Testing a UBJSON decoder implementation. You are writing or debugging a UBJSON parser for a game engine or embedded system and need known-correct binary output generated from specific JSON input to test against.
  • Preparing compact asset data for a game engine. A game engine's asset pipeline reads UBJSON for smaller file sizes and faster parsing than text JSON, and your source data currently exists as JSON.
  • Comparing UBJSON's binary size against plain JSON. You want to see how much smaller a given JSON document becomes once serialized to UBJSON's compact binary representation.
  • Building fixtures for a cross-language UBJSON test suite. You are validating that a UBJSON implementation in one language produces the same bytes as another, and need a reference binary file generated from known JSON.

Examples

Serialize an object to UBJSON

Input

{"name": "Ada", "age": 36}

Output

data.ubj: a 24 B binary file (download from the output panel)

About the Convert JSON to UBJSON tool

Convert JSON to UBJSON does its work locally, right in the browser. Convert a JSON file to Universal Binary JSON (UBJSON). There is no upload step, no queue and no account, and your data never travels over the network.

It belongs to the JSON Tools collection on EditSafely, a set of 90 small, focused JSON utilities that share the same instant, private workspace.

There is nothing to configure. Provide the input and the result appears on its own. The finished file is put together in browser memory and saved with the Download button, so it never touches a server on the way to your disk. A worked example further down the page shows exactly what the tool produces for a real input.

Running locally also makes the tool fast and dependable: results appear as you type or drop a file, there is no server outage that can take it down mid-task, and confidential data can be processed without a second thought.

Frequently asked questions

Is Convert JSON to UBJSON free to use?

Yes, it is completely free. All 2,658 tools on EditSafely work without an account, a subscription or usage limits.

Is it safe to paste sensitive or confidential data?

Everything happens locally. Your browser downloads the tool's code once, then does all the processing itself; nothing you enter is transmitted, stored or logged. You can even go offline after the page loads and it will still work.

How much text can I process at once?

There is no fixed limit. Because the work happens on your own device rather than on a shared server, the practical ceiling is your machine's memory, which comfortably handles inputs far larger than typical online tools allow.

Do I need to sign up or install anything?

No. The tool works in any modern browser on desktop, tablet or phone. There is no account to create, no extension to add and no software to install.

How do I save the output?

Click the Download button once the result is ready. The file is built in your browser's memory and handed straight to your downloads folder, without passing through a server.

Related tools

All JSON Tools