CBOR Decoder — Decode CBOR Hex or Base64 Online
- This tool runs entirely in your browser. Nothing you enter or upload is sent to a server.
Bytes (hex or Base64)
Paste, type or drop a file
Decoded
Paste bytes to decode them
Paste or type on the left, upload a file, or drop one onto the input.
See also
About this tool
CBOR (RFC 8949) is a compact binary format built on the JSON data model. You will meet it in IoT devices, in WebAuthn and passkey responses and in COSE and CWT security tokens. The bytes carry their own structure, so they can be decoded without a schema, and this tool prints the result as readable text.
Try a2 01 02 03 04: a2 is a map of two pairs, followed by 1: 2 and 3: 4, so it decodes to {1: 2, 3: 4}. CBOR keys are not limited to strings. A tagged value such as c1 1a 51 4b 67 b0 is tag 1, an epoch date, and the tool adds the meaning: 2013-03-21T20:04:00.000Z. Half-precision floats are handled too: f9 3c 00 is 1.0.
Integers up to 64 bits are exact, tag 2 and 3 big numbers are converted to their full value (c2 49 01 00 00 00 00 00 00 00 00 is 18,446,744,073,709,551,616), and indefinite-length strings, arrays and maps, which end with a ff break byte, are supported. Binary data is written as h'0102' and text is checked as UTF-8.
Only the first item is decoded, with a warning for anything left over, and an error shows the byte offset. For a passkey, paste the Base64URL attestation object. The tool also reads MessagePack and Protocol Buffers on its other tabs, and nothing is uploaded.
Frequently asked questions
What is the difference between CBOR and JSON?
CBOR has the same kinds of values but is binary, adds raw byte strings, 64-bit integers, tags and non-string map keys, and is more compact.
What are CBOR tags?
A tag is a number placed before a value to say what it means, for example 1 for a date given in seconds, or 2 for a big number held in bytes. The tool names the common ones and shows the converted value.
Can I decode a passkey or WebAuthn response?
Yes. The attestation object is CBOR, and so is the COSE key inside it. Paste the Base64URL text with Auto-detect on.
Why does it say “break outside an indefinite-length item”?
The byte 0xff only ends an indefinite-length item. Seeing it elsewhere usually means the data is not CBOR, or it was cut at the wrong place.