CBOR Decoder: Decode CBOR to JSON Online
Drop in a CBOR file to decode it into readable JSON. CBOR (Concise Binary Object Representation, RFC 8949) is a compact binary format used by COSE, WebAuthn, and many IoT protocols. This tool reads every major type, including unsigned and negative integers, byte strings, text strings, arrays, maps, tags, and half, single, and double precision floats, plus indefinite-length items. Byte strings are shown as hex and very large integers as strings so the output stays valid JSON. The file is decoded entirely in your browser and never uploaded.
How to decode a CBOR file
- Drag a CBOR file onto the box, or click to browse for one.
- Read the decoded value as pretty-printed JSON, with the byte count shown.
- Click Copy to grab the JSON for a bug report, a test, or your notes.
Examples
A small array
Bytes 83 01 02 03 (a CBOR array of three integers)
[ 1, 2, 3 ]
A simple map
Bytes A1 61 61 01 (a CBOR map with one pair)
{
"a": 1
}Frequently asked questions
Is my CBOR file uploaded anywhere?
No. The file is read and decoded entirely in your browser using JavaScript. Nothing is sent to a server, so tokens, credentials, and proprietary payloads stay on your device.
How does the in-browser decoding work?
The file bytes are read into memory and parsed against the CBOR data model from RFC 8949. Each item's initial byte gives its major type and length, and the decoder walks the structure recursively to build a JavaScript value, then serializes that value to JSON.
What is CBOR and where is it used?
CBOR (Concise Binary Object Representation) is a compact binary format with a data model similar to JSON. It is used by COSE and WebAuthn, by CoAP and many IoT protocols, and anywhere small, fast-to-parse messages matter.
How are byte strings and big numbers shown?
Byte strings are not always valid text, so they are rendered as a hex string inside a marker object like {"$bytes": "01ff"}. Integers larger than JavaScript can hold exactly are shown as quoted decimal strings so the JSON stays lossless and valid.
Does it support tags and floats?
Yes. Tagged values (major type 6) are decoded and wrapped with their tag number, and half, single, and double precision floats are all converted to numbers. Indefinite-length strings, arrays, and maps that end with a break byte are supported too.
What happens if the file is not valid CBOR?
If the bytes are truncated or do not follow the CBOR encoding, decoding stops and an error message is shown instead of a result. Only the first complete top-level item is decoded, and the byte count tells you how much was read.
Related tools
Hex Viewer
View any file as a classic hex dump in your browser: byte offsets, two-digit hex, and an ASCII gutter side by side. Nothing is uploaded. Copy the dump.
File Type Identifier
Find out what a file really is from its magic bytes, not its extension. Detects images, audio, video, archives, fonts, and more in your browser. Private.
JSON File Validator
Validate a JSON file in your browser, pinpoint syntax errors by line and column, and analyze its structure: depth, keys, value types, and size. Private.
Base64 File Encoder
Encode any file to Base64 and a data URI in your browser. Drop a file to get the raw Base64 and a ready data: URI to copy. Nothing is uploaded.
CSV File Inspector
Inspect a CSV file in your browser: detect the delimiter, encoding and BOM, count rows and columns, guess the header, and preview sample rows. Private.
ELF Header Inspector
Drop a Linux or Unix binary to read its ELF header: 32 or 64-bit, endianness, file type, CPU architecture, OS ABI and entry point. Runs in your browser.