CBOR Encoder & Decoder
Inspect CBOR bytes as a value tree with byte offsets, or turn plain JSON into deterministic CBOR — useful when reading CBOR tokens, CBOR payloads and binary configuration.
CBOR (Concise Binary Object Representation, RFC 8949) is a compact binary data format built from a small set of major types: unsigned and negative integers, byte strings, text strings, arrays, maps, tags and simple values including floats. Decoding reads every item from the first byte, checks that each declared length fits inside the input, validates UTF-8 in text strings and reports the byte offsets so you can follow a capture or a token field by field. Indefinite-length strings, arrays and maps are supported, as are 16-, 32- and 64-bit floats, tags and integers wider than 2^53 (shown as exact decimal strings). Items that use more bytes than the shortest form, repeated map keys and reserved encodings are flagged instead of silently accepted. Encoding accepts a JSON value and writes canonical CBOR: shortest integer forms, definite lengths, and map keys ordered by encoded length and then bytewise, which is the deterministic encoding in RFC 8949 section 4.2.1. Byte strings, tags, big integers, undefined and simple values are written with the markers {"$bytes":"0102"}, {"$tag":0,"value":"..."}, {"$bigint":"18446744073709551616"}, {"$map":[[key,value]]}, {"$undefined":true}, {"$simple":16} and {"$float":"NaN"}. Inputs are limited to 4,096 bytes, 2,000 items and 32 levels of nesting. Everything runs in your browser; nothing is sent or stored.