Skip to content
UniKit

CBOR viewer

Pick a CBOR (RFC 8949) file and decode it locally: major types 0–7, indefinite-length arrays, maps and strings, half-precision floats and tags (dates, big integers, nested CBOR) become a structure tree with type, byte offset and length — or a JSON view — plus a hex preview and real stats. Failures report the offending byte offset.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Pick a CBOR file (an IoT message or COSE structure, for instance). It is parsed locally in your browser and never uploaded.

Pick a file first.

Result

These are the real numbers from this run — copy them straight out.

Pick a file and set the options; the result shows up here.

What this tool does

  • Inspect a CBOR payload (IoT sensor readings, COSE signature structures, WebAuthn attestation) to see its fields and types
  • Debug encoding questions: is an integer indefinite-length, is a byte string chunked, is the tag number right
  • Check a protocol implementation by byte offset and length per node, or copy the JSON view somewhere else

Example

Input

a2 61 61 01 61 62 82 02 03

Output

Map(2)  [map @0 +9]
  a: 1  [uint @3 +1]
  b: Array(2)  [array @6 +3]
    0: 2  [uint @7 +1]
    1: 3  [uint @8 +1]

Put those nine bytes into a .cbor file and pick it: they are the RFC 8949 encoding of { "a": 1, "b": [2, 3] }. The `@` value is the byte offset, `+` is the size of that item.

Frequently asked questions

What does the reported offset mean when parsing fails?

CBOR is binary, so the only honest position is a byte offset. Reserved additional information (28–30), truncated data, invalid UTF-8 and illegal chunks inside indefinite-length containers all raise "invalid-cbor@offset"; the page renders it in hex and shows the surrounding 48 bytes so you can compare it with the file.

Which CBOR features are supported?

All major types 0–7: unsigned and negative integers, byte strings, text strings, arrays, maps, tags and simple values plus floats (half-precision included); indefinite-length arrays, maps and strings are supported too (chunked strings are reassembled), along with the common tags 0 (date string), 1 (epoch time), 2/3 (big numbers) and 24 (nested CBOR).

What are the "trailing bytes" in the result?

A CBOR payload normally holds a single top-level item. If extra bytes follow the first complete item (two payloads concatenated, or something appended to the file) the tool still decodes the first item and reports the leftover count honestly, with a warning in the interface — it never pretends the file was clean.

Does it decrypt CBOR-based crypto payloads?

No. COSE (RFC 9052) signed and encrypted structures are protected by construction; this tool only decodes the CBOR layer and shows the bstr / tag / array structure. Key agreement, decryption and verification need a dedicated library, and the page makes no network requests at all.

Keywords:cborrfc 8949binarydecodehextagbignum

Related tools