Skip to content

CBOR Converter

Decode CBOR (RFC 8949) bytes into JSON, or encode JSON as CBOR. Paste hex or Base64, as found in WebAuthn attestations, COSE keys or IoT messages, and see maps, arrays, byte strings, tags and dates as readable JSON. Encoding writes compact CBOR in the same formats.

Reset

Frequently asked questions

What is CBOR?

CBOR, the Concise Binary Object Representation defined in RFC 8949, is a binary data format based on the JSON data model. It is used in WebAuthn and passkeys, COSE, the European digital COVID certificate and many constrained IoT protocols.

How are byte strings shown?

As an object such as {"$binary": "AQID"} with the bytes in Base64, because JSON has no binary type.

How are tags handled?

Well-known tags are decoded: date-times (tags 0 and 1) become ISO 8601 strings and big numbers (tags 2 and 3) become numbers or strings. Other tags are shown as {"$tag": number, "value": ...}.

What happens to map keys that are not strings?

CBOR allows numbers and other values as map keys, as COSE keys use 1, 3 and -1. JSON keys must be strings, so such keys are written as text, for example "1" or "-1".

How does encoding work?

The JSON is written with the shortest length headers for maps, arrays and strings, integers in their smallest form and other numbers as 64-bit floats. Objects become CBOR maps with text keys.

How do I paste the bytes?

Choose hex or Base64. Hex may contain spaces, colons or 0x prefixes, and Base64 may use the standard or the URL-safe alphabet, as WebAuthn data often does.

About OneClick Pro

OneClick Pro is a free collection of more than 150 web tools for everyday work: converting images and units, formatting and validating code, checking domains and SEO, and working with text, dates and numbers. Every tool runs without registration or subscription, and what you enter is only used to calculate your result and is never stored. Use it as a quick toolbox for one-off tasks, or bookmark the tools you rely on every day.