Introduction
CBOR is an IETF standard for compact binary data, with the same kinds of value as JSON plus raw bytes and tagged types such as dates. It was first published as RFC 7049 in 2013 and is now RFC 8949. Like MessagePack, which it resembles, it needs no schema.
CBOR is used in small devices and in security standards: WebAuthn passkeys and the COSE signing format are built on it.
Structure
A CBOR file is one value, or a run of values, with no header. Each value starts with one byte. Its top three bits are the major type; its low five bits hold a small number directly (0 to 23), or say that 1, 2, 4 or 8 bytes follow with the number (24 to 27), or mark an indefinite length (31). Multi-byte numbers are big-endian.
| Major type | First byte | Holds |
|---|---|---|
| 0 | 00–1B | an unsigned integer |
| 1 | 20–3B | a negative integer, −1 minus the number |
| 2 | 40–5F | a byte string: a length, then the bytes |
| 3 | 60–7F | a UTF-8 text string |
| 4 | 80–9F | an array: a count, then that many values |
| 5 | A0–BF | a map: a count, then key and value pairs |
| 6 | C0–DB | a tag number, then the value it describes |
| 7 | E0–FF | false (F4), true (F5), null (F6), floats, and the break byte FF |
A file may start with tag 55799, the bytes D9 D9 F7, which marks it as
CBOR without changing the value. The data
items and tags page gives every code and the common tags.
Not described
The reference follows RFC 8949 and the IANA CBOR tag registry (read 2026-11-13).
Known, not yet covered
- Reference: the content layouts of registered tags defined in documents other than the RFCs now covered on the items page (RFC 8746, 9052, 9338, 8392, 8943, 9581, 9164, 9542, 9090, 9254 tags 43 to 47, 9290 and 9277): CoRIM and the other Internet-Drafts (SUIT, CRI, CWT selective disclosure, Gordian Envelope, notable-tags and the rest), RFC 9132, 9393, 9711 and 9781, and the non-RFC registrants (cbor.schmorp.de, Blockchain Commons, FHIR, Occil and others). The registry table names each of them. The YANG-CBOR encoding of data nodes (RFC 9254 apart from its five tags) is also not reproduced.
- Viewer: not re-audited in this pass.
Unknown
- Reference: tags that are not in the registry, whose meaning only the writing application knows; the registry itself changes, and this page is as of 2026-11-09.
Links
Software
- cbor.me – converts between CBOR bytes and readable text (web)
Developers
- cbor2 – CBOR encoder and decoder (Python)
- TinyCBOR – small CBOR library for embedded systems (C)
- Implementations in other languages – the list on cbor.io
Reference
- RFC 8949 – Concise Binary Object Representation (CBOR)