JSON to Base64 screenshot

JSON to Base64

Encode a JSON document as Base64 in your browser. The text is read as UTF-8 first, so non-ASCII content round-trips.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Instant
No signup

What encoding JSON as Base64 does

The document is converted to UTF-8 bytes and then to the standard Base64 alphabet with padding, which is what a Basic-auth header, a data field, or a Kubernetes secret expects. Encoding the text as UTF-8 first is what makes a café or a Chinese character survive: encoding the JavaScript string directly would produce the wrong bytes for anything outside Latin-1. The output contains no line breaks, so it is safe to paste into a single header or field.

How to use it

JSON to Base64: paste the JSON into the box above, and press Run to get the Base64 below.

Worked example

Input:

{"user":"ada","note":"café","tags":["a","b"]}

Output:

eyJ1c2VyIjoiYWRhIiwibm90ZSI6ImNhZsOpIiwidGFncyI6WyJhIiwiYiJdfQ==

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads JSON and returns Base64; reloading the page discards both.

The document is converted to UTF-8 bytes and then to the standard Base64 alphabet with padding, which is what a Basic-auth header, a data field, or a Kubernetes secret expects. Encoding the text as UTF-8 first is what makes a café or a Chinese character survive: encoding the JavaScript string directly would produce the wrong bytes for anything outside Latin-1. The output contains no line breaks, so it is safe to paste into a single header or field.

Encode a JSON document as Base64 in your browser. The text is read as UTF-8 first, so non-ASCII content round-trips.

How to use it

JSON to Base64: paste the JSON into the box above, and press Run to get the Base64 below.

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads JSON and returns Base64; reloading the page discards both.

What to Expect

Best for

  • Converting JSON to Base64 when the data is already on screen.

What this tool keeps

  • Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.

Sample input

{"user":"ada","note":"café","tags":["a","b"]}

Sample output

eyJ1c2VyIjoiYWRhIiwibm90ZSI6ImNhZsOpIiwidGFncyI6WyJhIiwiYiJdfQ==

Frequently asked questions

How do I use the json to base64?

JSON to Base64: paste the JSON into the box above, and press Run to get the Base64 below.

Is my input uploaded?

No. The text is parsed on this page with JavaScript and is never posted to a server.

Is there a size limit?

Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.