ToolWren logo ToolWren
ToolWrenTokens › CBOR

CBOR Decoder

Paste a CBOR (Concise Binary Object Representation) payload as hex to decode it into readable JSON. CBOR is the compact binary cousin of JSON used widely in IoT.

100% client-side · nothing is uploaded

Loading tool…

Quick answer

CBOR is a free, private online tool that lets you decode a CBOR binary payload from hex into readable JSON. It runs entirely in your browser, so nothing you enter is uploaded to a server.

How to use the CBOR

  1. Paste your CBOR payload as hexadecimal bytes into the Input box.
  2. The decoded JSON appears automatically in the output.
  3. Byte strings are shown as hex inside a $bytes wrapper.
  4. Click Copy to copy the JSON result.

Privacy: this tool runs entirely in your browser. Your input is never sent to, received by, or stored on any server — there are no uploads and no tracking of what you enter.

About CBOR

What is CBOR?

CBOR (RFC 8949) is a binary data format that models the JSON data set but is far more compact and faster to parse. It's the payload format behind COSE, CWT and many CoAP/IoT applications.

How decoding works

Each CBOR item starts with an initial byte encoding a major type (integer, string, array, map, etc.) and a length or value. This tool walks the bytes and reconstructs the equivalent JSON structure, showing byte strings as hex.

When to use it

Decoding CBOR is essential when debugging constrained-device messages, inspecting CWT tokens, or reading the payload of a CoAP response that uses application/cbor.

Frequently asked questions

What input format is expected?
Hexadecimal bytes. Spaces, newlines and 0x prefixes are ignored.
How are byte strings shown?
As an object like {"$bytes":"..."} containing the hex, since raw bytes have no direct JSON equivalent.
Does it support indefinite-length items?
Not yet — streamed/indefinite-length CBOR is uncommon in IoT payloads and is reported as unsupported.
Is my data uploaded?
No. All decoding happens in your browser.

Understanding CBOR in depth

What CBOR is

CBOR — Concise Binary Object Representation (RFC 8949) — is a binary data format that models the same data as JSON (numbers, strings, arrays, maps, booleans, null) but encodes it in a compact, fast-to-parse binary form. It was designed for constrained environments where every byte and CPU cycle counts, which is why it is the payload format of choice across the Internet of Things.

Why binary instead of JSON

JSON is human-readable but verbose: keys and values are spelled out as text, numbers are strings of digits, and there is a lot of punctuation. CBOR replaces all of that with tight binary encoding — small integers take a single byte, lengths are prefixed rather than delimited, and no parsing of text numbers is needed. The result is smaller messages and much faster encoding and decoding on low-power hardware.

How a CBOR item is structured

Each CBOR value starts with one initial byte that encodes a major type (0–7: unsigned int, negative int, byte string, text string, array, map, tag, or simple/float) together with either a small value or a hint about how many following bytes carry the length or value. The decoder reads that initial byte, determines the type and length, then reads the data — recursing into arrays and maps to rebuild the whole structure.

How this decoder works

Paste a CBOR payload as hexadecimal and the tool parses it byte by byte into the equivalent JSON, so you can actually read what a device or token contains. Because raw byte strings have no direct JSON equivalent, they are shown as hex inside a $bytes wrapper. It supports the definite-length items that dominate real-world payloads.

Where you'll meet CBOR

CBOR underpins several important standards: COSE (CBOR Object Signing and Encryption), CWT (CBOR Web Tokens, the binary cousin of JWTs), WebAuthn/FIDO2 credentials, and many CoAP responses that use the application/cbor content format. This decoder is the quickest way to inspect those payloads while debugging — entirely in your browser, with nothing uploaded.

Related & complementary tools

More Tokens tools