Skip to content
uencoder

CBOR (Concise Binary Object Representation) Specification

CBOR (RFC 8949) is a binary data format extending JSON with compact encoding, typed values, and extensibility.

Encoding Features

CBOR encodes JSON-compatible data in a compact binary format with type tags. Integers use variable-length encoding for efficiency. Strings, byte strings, arrays, and maps have definite and indefinite-length forms. CBOR supports types beyond JSON: byte strings, bignums, dates, URIs, and custom tags. The format is self-describing and extensible via tag numbers.

compact
Variable-length ints
smaller than JSON
byte strings
Native binary support
no base64 needed
tags
Extended types
dates, bignums, URIs

Applications

CBOR is used in COAP (Constrained Application Protocol) for IoT. WebAuthn uses CBOR for authenticator messages. The format is specified in RFC 8949 (formerly 7049). CBOR supports deterministic encoding for canonical comparison and hashing. The Concise Data Definition Language (CDDL) describes CBOR structures. Libraries exist for most programming languages.

COAP
IoT protocol
RFC 7252
WebAuthn
FIDO2 messages
binary protocol
deterministic
Canonical encoding
for hashing

Related tools

References