{ } JSON Workbench0 network requests. Check DevTools

"Base64 Encode":{ }

Convert text or JSON to Base64 instantly. Input is UTF-8 encoded first, so emoji and accented characters round-trip correctly, the classic btoa() pitfall handled. Runs 100% in your browser: zero network requests.

What is Base64 encoding?

Base64 represents arbitrary bytes using 64 text-safe characters (A–Z a–z 0–9 + /), so binary or Unicode data can travel through channels that only handle plain text: JSON strings, HTTP basic auth, data URIs, email attachments. It inflates size by ~33% and provides no secrecy: it's a format, not a cipher.

Edge cases & gotchas

  • JavaScript's raw btoa() throws on non-Latin1 characters. Encode to UTF-8 bytes first (this tool does).
  • URL-safe Base64 swaps + / for - _ (used in JWTs); our decoder accepts both.
  • Base64 output is ~33% larger than the input, so don't Base64 large payloads needlessly.

How to use

  1. Paste text, JSON, or any string into the Input pane.
  2. The Base64 output appears instantly: standard alphabet with padding.
  3. Input is UTF-8 encoded first, so emoji and accented characters survive the round-trip.
  4. Copy or download the result.

Examples

Encode text

Input
hello
Output
aGVsbG8=

Encode JSON (UTF-8 safe)

Input
{ "café": "☕" }
Output
eyAiY2Fmw6kiOiAi4piVIiB9

FAQ

Is Base64 encryption?

No. It's an encoding, freely reversible by anyone. Never use it to protect secrets; it only makes binary/text safe for transport in text-only channels.

How does this handle emoji and non-ASCII text?

Input is converted to UTF-8 bytes first (the common cause of broken btoa results), so any Unicode text round-trips correctly.

Why does the output end with = signs?

Padding: Base64 emits 4 characters per 3 bytes, and = pads the final group. Some systems (JWTs) strip it.

Is my data uploaded?

No. Encoding runs entirely in your browser. Verify zero network requests in DevTools.

Related tools