JSON to Base64 Encoder

Paste JSON on the left, get its Base64 encoding on the right. Your JSON is validated and minified first, then encoded UTF-8 safely — emoji, accented characters and CJK text all round-trip correctly.

100% Client-Side Instant No uploadYour data never leaves your browser

How to use this tool

Paste valid JSON into the input on the left — it is validated before encoding.

The Base64 string appears on the right instantly.

The payload is minified before encoding, so the Base64 is as short as possible.

Copy it into your Authorization header, data: URL, JWT segment, or wherever Base64 is required.

Frequently asked questions

Is the encoding UTF-8 safe?

Yes. The text is encoded to UTF-8 bytes first, then those bytes are Base64-encoded. Emoji, accented characters, and CJK text all decode back byte-perfectly — unlike naive btoa() implementations that throw on non-ASCII.

Why is my JSON minified first?

Whitespace inside JSON carries no meaning, so removing it before encoding produces the shortest possible Base64 string. If you need the exact original bytes preserved, encode the raw text with any Base64 tool — but for JSON payloads, minified is what you want.

Where is JSON-as-Base64 used?

Common cases: JWT payload segments, data: URLs that inline JSON, HTTP Basic-style headers, Kafka/RabbitMQ message bodies, and single-line transport of multi-line JSON.

Does Base64 encrypt my JSON?

No — Base64 is an encoding, not encryption. Anyone can decode it. Never treat Base64 as a way to hide sensitive data.

Is my data uploaded anywhere?

No. Encoding happens in your browser with the native TextEncoder and btoa APIs. Nothing is sent to any server.

Related tools