Boneyard Tools

CBOR Decoder: Decode CBOR to JSON Online

Drop in a CBOR file to decode it into readable JSON. CBOR (Concise Binary Object Representation, RFC 8949) is a compact binary format used by COSE, WebAuthn, and many IoT protocols. This tool reads every major type, including unsigned and negative integers, byte strings, text strings, arrays, maps, tags, and half, single, and double precision floats, plus indefinite-length items. Byte strings are shown as hex and very large integers as strings so the output stays valid JSON. The file is decoded entirely in your browser and never uploaded.

How to decode a CBOR file

  1. Drag a CBOR file onto the box, or click to browse for one.
  2. Read the decoded value as pretty-printed JSON, with the byte count shown.
  3. Click Copy to grab the JSON for a bug report, a test, or your notes.

Examples

A small array

Bytes 83 01 02 03 (a CBOR array of three integers)
[
  1,
  2,
  3
]

A simple map

Bytes A1 61 61 01 (a CBOR map with one pair)
{
  "a": 1
}

Frequently asked questions

Is my CBOR file uploaded anywhere?

No. The file is read and decoded entirely in your browser using JavaScript. Nothing is sent to a server, so tokens, credentials, and proprietary payloads stay on your device.

How does the in-browser decoding work?

The file bytes are read into memory and parsed against the CBOR data model from RFC 8949. Each item's initial byte gives its major type and length, and the decoder walks the structure recursively to build a JavaScript value, then serializes that value to JSON.

What is CBOR and where is it used?

CBOR (Concise Binary Object Representation) is a compact binary format with a data model similar to JSON. It is used by COSE and WebAuthn, by CoAP and many IoT protocols, and anywhere small, fast-to-parse messages matter.

How are byte strings and big numbers shown?

Byte strings are not always valid text, so they are rendered as a hex string inside a marker object like {"$bytes": "01ff"}. Integers larger than JavaScript can hold exactly are shown as quoted decimal strings so the JSON stays lossless and valid.

Does it support tags and floats?

Yes. Tagged values (major type 6) are decoded and wrapped with their tag number, and half, single, and double precision floats are all converted to numbers. Indefinite-length strings, arrays, and maps that end with a break byte are supported too.

What happens if the file is not valid CBOR?

If the bytes are truncated or do not follow the CBOR encoding, decoding stops and an error message is shown instead of a result. Only the first complete top-level item is decoded, and the byte count tells you how much was read.

Related tools