# CBOR Encode > Use this CBOR encoder as a JSON to CBOR converter. Encode valid JSON into binary CBOR shown as Base64, then copy the payload. This **CBOR encoder** converts valid JSON into Concise Binary Object Representation and displays the resulting bytes as Base64. Use it to prepare a small serialized test payload. The current form accepts JSON text; it has no diagnostic-notation mode, file upload, or Hex-output selector. ## Overview & Metadata - **Canonical URL:** https://million.tools/cbor-encode/ - **Markdown Copy (.md.txt):** https://million.tools/cbor-encode.md.txt - **Plain Text Copy (.txt):** https://million.tools/cbor-encode.txt - **API Endpoint:** https://million.tools/api/v1/run/cbor-encode (POST, Keyless, 60 req/min) - **SEO Title:** CBOR Encoder Online | JSON to Base64 CBOR - **Alternative Names:** JSON to CBOR Converter, Encode JSON as CBOR, CBOR serialization tool, JSON CBOR encoder, CBOR Base64 encoder - **Category:** [Encoding](https://million.tools/encoding/) - **Tags:** [#CBOR](https://million.tools/tag/cbor/) - **Application Category:** `DeveloperApplication` - **Platform:** Web (All modern desktop and mobile browsers, requires JavaScript) - **Price:** Free ($0.00 USD, no registration or sign-up required) - **Live Calculation:** Supported (`Auto / Live` toggle enabled by default) - **Usage Statistics:** 23 views - **Published:** 2026-11-30 - **Last Updated:** 2026-11-30 - **Author:** Egor Volchenko (Developer & Author) ## Key Features - Encode valid JSON values as CBOR - Accept text or encoded JSON source bytes - Display binary CBOR as Base64 - Update with Auto / Live or run manually - Copy the payload and clear text ## Parameters & Interface Controls ### Input Parameters & Options - `input_text`: Input text. - `input_encoding`: `Hex` | `Hex (Ignore Non-Hex Characters)` | `Base64` | `UTF-8` | `UTF-16LE` | `UTF-16BE` | `Windows-1251 (Cyrillic)` | `Windows-1252 (Latin 1)` | ... (42 options) ### Output Fields & Metrics - `result`: CBOR Encode Result. - **Controls:** `Run`, `Clear`, `Copy`, `Fill test data`, `Auto / Live` ## Interactive Example (Test Vector) **Settings:** - Input Encoding: `UTF-8` **Input text:** ```text [1,2,3] ``` **CBOR Encode Result:** ```text gwECAw== ``` ## How to use CBOR Encode Use the following steps to process a small test input. ### Convert JSON to CBOR bytes 1. Paste one JSON value into Input text. Use double quotes for object keys and strings. 2. Set Input Encoding: to UTF-8 for JSON text. Choose Hex or Base64 only when the JSON text itself is already encoded that way. 3. Leave Auto / Live on to update the result as you edit. To run manually, turn it off and click Run. 4. Read CBOR Encode Result as Base64. The value represents CBOR bytes, not JSON text encoded directly as Base64. 5. Click Copy to copy the result. Use Clear where shown, or the field clear controls, to remove the text. JSON input `[1,2,3]` returns `gwECAw==`. Decoding that Base64 gives CBOR bytes `83010203`. > A rejected request may leave an earlier result visible. Clear the fields and recheck the input before relying on a new calculation. ### Keep JSON syntax separate from CBOR notation Objects, arrays, strings, numbers, booleans, and null can be supplied as JSON. CBOR diagnostic notation and JavaScript object syntax are different languages and are not accepted as alternative input modes. ### Compare decoded values as well as bytes CBOR allows several encodings for some values. This form has no canonical-encoding option, map-sorting control, or tag editor. A different valid encoder can produce different bytes for an equivalent value. ## Frequently asked questions ### Does this take JSON or CBOR diagnostic notation? It requires valid JSON after the selected input encoding is applied. Diagnostic notation is not an available input mode. ### Why is the result Base64 instead of readable CBOR? CBOR is binary. Base64 gives those bytes a printable representation. The form does not expose an output-format selector. ### Can I encode a JSON string by itself? Yes. Put the string in JSON quotes, such as `"hello"`. Bare `hello` is not valid JSON. ### Does it create canonical or deterministic CBOR? No canonical mode is exposed or promised. If your protocol requires exact deterministic encoding rules, use an implementation configured for those rules. ### How are very large integer inputs handled? Integer tokens outside the safe JavaScript integer range are preserved as big integers for encoding. Decoding such values to this tool’s JSON display converts them to strings, so a display round trip can change their JSON type. ### Is the calculation performed only in my browser? No. This form sends the entered data to the calculation API. Use sample data instead of production secrets. ## Related Tools - [CBOR Decode](https://million.tools/cbor-decode/): Decode CBOR bytes entered as Base64 or Hex into a readable JSON display. Inspect values and byte arrays without a file upload. - [URL Encode](https://million.tools/url-encode/): Percent-encode a URL component or text value using UTF-8. Convert spaces, plus signs, and reserved characters before inserting a value into a URL. - [URL Decode](https://million.tools/url-decode/): Decode percent-encoded text and URL components. Convert UTF-8 byte escapes to readable text while preserving literal plus signs. - [JWT Decoder](https://million.tools/jwt-decoder/): Inspect a JSON Web Token’s decoded header and payload. Read claims as JSON for debugging; decoding does not verify the signature or token validity. - [Base64 Encode](https://million.tools/base64-encode/): Encode text or entered bytes as standard Base64. Select UTF-8, Hex, or another supported input encoding, then copy the encoded string. ## About the Author **Egor Volchenko** — *Developer & Author* Hi! I’m a WordPress developer with over 10 years of experience. I love Tailwind CSS, clean code, and intuitive interfaces. I’m currently working on million.tools — a service with convenient online tools for everyday tasks. I’m building it from scratch with great attention to detail and user experience. - **Links:** [x.com](https://x.com/egorleet) · [github.com](https://github.com/egorleet) · [t.me](https://t.me/egorleet) · [instagram.com](https://www.instagram.com/egorleet) · [facebook.com](https://www.facebook.com/egorleet/) · [egorleet.blog](https://egorleet.blog/) · [mastodon.social](https://mastodon.social/@egorleet) · [twitch.tv](https://www.twitch.tv/egorvolchenko) · [stackoverflow.com](https://stackoverflow.com/users/31679135/egor-volchenko) · [reddit.com](https://www.reddit.com/user/Vegetable_Window9185/) · [youtube.com](https://youtube.com/@egor-volchenko)