CBOR Hex to JSON Converter & Encoder
Encode JSON as CBOR Hex or decode CBOR Hex into JSON.
How to use
Enter {"a":1} in Encode mode to get a1616101. In Decode mode, paste a1616101 to read the JSON back.
FAQ
Where are the CBOR and JSON inputs parsed?
The browser parses the pasted JSON or CBOR Hex locally and displays the converted value on the page.
What is supported?
Supports JSON-compatible values and CBOR byte strings. Large integers become decimal strings and byte strings become objects with a hex field. Tags, indefinite lengths, invalid UTF-8, non-finite numbers, undefined and duplicate map keys are rejected.
Other Languages
References
How we make sure
We check this tool with the automated test suites linked below. Example checks are shown in their original language.
- Verification method
- Compare encoded bytes with a stored Python cbor2 fixture, decode that fixture and reject a duplicate-key map. Explicit rejection checks cover invalid UTF-8, indefinite structures, NaN, infinities and undefined; an exact uint64-to-decimal-string case remains accepted.
- Comparison reference
- Python cbor2 6.2.0.post2 stored fixture versus cborg 6.2.1; generator/provenance in tests/fixtures/completion-tools.json.
- Verification scope
- Covers the shown JSON/CBOR conversions and selected malformed inputs, including invalid UTF-8, duplicate map keys and indefinite-length items.
Test source and cases (select a file to read it)
-
completion-tools.test.js
- cbor-converter: cbor2 fixture and malformed duplicate-key input
- CBOR strict policy rejects invalid UTF8 indefinite structures and non-JSON values
These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.