Paste it in, no server needed
Paste CBOR bytes,
from major type to COSE signature
Drop in RFC 8949 CBOR as Hex, Base64 or Base64url and read byte offsets, major types 0-7, indefinite-length items, tags and Float16/32/64 as a structure tree and a major-type decomposition table, with the same data in RFC 8949 Extended Diagnostic Notation and in JSON with every loss point flagged. A Tag 18 COSE_Sign1 is split into protected, unprotected, payload and signature, and a public key lets WebCrypto verify the signature. Zero input sent to a server (advertising and affiliate widgets excepted).
- CBOR decoder
- EDN output
- Deterministic encoding
- COSE_Sign1
- WebCrypto verify
- Zero input sent
CBOR input
Spaces, 0x, colons and hyphens are ignored. Empty input decodes to nothing.
JSON to CBOR
Write a byte string as {"$bytes":"hex or base64url"}, an integer-keyed map as {"$map":[[key,value],…]} and a tag as {"$tag":number,"value":value}.
Public key
Paste a JWK (JSON) or an SPKI PEM. The key is used only inside this page.
Result
Diagnostics
Decomposition —
| offset | header | major type | AI | argument | length or count |
|---|
Structure tree
EDN —
COSE_Sign1 —
| scope | label | name | value |
|---|
CWT claims (RFC 8392)
| label | name | value |
|---|
signature
Payload content
The download name follows the active tab: cborlab-report.md, cborlab-report.json, cborlab-item.edn and so on.
Structure summary
How to read it
- Severity is error (cannot be decoded), warning (valid but discouraged by the spec) or note (context).
- Indefinite length is valid CBOR, but deterministic encoding never uses it.
- EDN is the RFC 8949 §8 notation. Read it together with the JSON loss notes so a conversion is not mistaken for a lossless copy.
Everything is computed in this browser. Input is never sent to a server.
How it works
- 01Paste the bytes
Enter CBOR as Hex or Base64, or pick one of the six synthetic presets. Nothing is ever sent anywhere.
- 02Read the structure
The structure tree shows each item's offset and reading, and the table shows every header byte by major type. The EDN tab writes the same items in RFC 8949 notation.
- 03COSE and export
For COSE_Sign1, inspect headers, CWT claims and the signature, then verify it with a public key. Download the Markdown or JSON report or the .cbor file.
What one screen holds
RFC 8949 decoder
Reads all of major types 0-7. 64-bit integers stay exact as strings, and byte and text strings are handled in both definite and indefinite-length form.
Structure and offsets
Every item's start offset, header bytes, major type, additional information and length or count become a table and an indented tree.
Diagnostic notation
h'..', "..", [_ ], {_ }, tags, simple(n) and floats come out in the RFC 8949 §8 notation, ready to copy or download as an .edn file.
Deterministic encoding
When JSON is encoded to CBOR, Core Deterministic Encoding (shortest headers, definite lengths, bytewise key order, smallest float width) can be switched on or off.
COSE_Sign1 reading
A Tag 18 item or a four-element array is detected, the protected bstr is decoded recursively, alg, kid, crit, content type and x5chain are named, and the payload is classified as text, JSON or CWT claims.
Signature check
With a JWK or SPKI public key the page builds the Sig_structure and verifies ES256, ES384, ES512, EdDSA, PS256 or RS256 through WebCrypto. The key never leaves the browser.
Why the input never leaves
A COSE signature can carry unpublished claims and CBOR can carry device data, so the decoder and the verifier live in the page.
Calculated in the page
The decoder, encoder, EDN writer and signature check are JavaScript in the page. There is no server call, no database and no analytics payload carrying the input.
Separate from ads
Advertising and affiliate widgets load from their own origins but never read the input. Results stay in the text areas and on the screen.
Nothing kept
Input and results are not stored. Closing the tab clears them, and only a file you downloaded yourself remains.
Questions
Is it safe to paste bytes that contain a signature?
The input is processed in the page and never sent or stored, and the public key is used only in browser memory. Advertising and affiliate widgets load from their own origins but do not read it.
What is EDN?
The Extended Diagnostic Notation of RFC 8949 §8: a readable text form of CBOR where h'..' is a byte string, [_ ] an indefinite-length array and 1(…) a tag.
Are half-precision floats read?
Yes. Half precision (1-5-10), float32 and float64 are all decoded per IEEE 754, and deterministic encoding picks the narrower width when the value survives it, as with 1.5 or 65504.
How is a COSE signature verified?
The page builds Sig_structure = ["Signature1", protected, h'', payload] from the protected bstr and the payload bstr and verifies it with WebCrypto. alg comes from label 1 in the protected header.
What is lost in the JSON view?
Non-string map keys, duplicate keys, integers above 2^53, tags, byte strings, undefined and NaN or Infinity. Each loss is reported with its offset.
Does the report contain the input?
No. It holds the diagnostic list, a structure summary, the EDN and the JSON result, never the full signed bytes or the public key.
Guides
All guidesFive articles: the CBOR header, EDN, indefinite length and deterministic encoding, COSE_Sign1, and what JSON conversion loses.
Open some bytes now
A synthetic example is already loaded. Paste real bytes and the content still never leaves the browser.