Jsony

Base64 Encoder & Decoder

Encode or decode Base64 in your browser. UTF-8 safe. Standard and URL-safe alphabets. Your data never leaves the page.

What is the Jsony Base64 Encoder & Decoder?

A simple, fast, UTF-8 safe Base64 tool. Type or paste in either pane and the conversion runs live — no Convert button to click, no round trip to a server. Switch between standard and URL-safe alphabets with one toggle.

Most one-off scripts use the browser's built-in atob and btoa, but those break on anything outside Latin-1 — emoji, accented characters, non-Latin scripts. This tool wraps them with TextEncoder / TextDecoder so any UTF-8 input round-trips correctly.

How to use it

  1. Pick a mode — Encode (text → Base64) or Decode (Base64 → text).
  2. Pick an alphabet. Standard for general use; URL-safe for tokens, filenames, URL parameters.
  3. Type or paste in the input. The output updates live.
  4. Swapto flip input and output (handy when you've decoded something and now want to re-encode it differently).
  5. Copy to put the output on your clipboard.

Common use cases

Inspecting authentication tokens. JWT segments, OAuth state parameters, basic-auth headers — all Base64. Use this to peek at the contents.

Encoding strings for URLs. When you need a value to survive a query string or path segment without escaping headaches, URL-safe Base64 is the standard choice.

Embedding small assets. Data URIs (e.g., data:image/png;base64,...) need a Base64-encoded payload. This tool lets you encode the bytes if you have them as text.

Debugging.When a tool dumps a Base64 blob and you want to know what's inside, paste it here.

Frequently asked questions

What's the difference between standard and URL-safe Base64?
Standard Base64 uses + and / as the last two characters of its alphabet, and = for padding. URL-safe Base64 (RFC 4648 §5) uses - and _ instead, and usually omits the trailing = padding. URL-safe is what you'll see inside JWTs, OAuth tokens, and anywhere a Base64 string sits in a URL or filename without needing escaping.
Does it handle Unicode correctly?
Yes. The browser's built-in atob/btoa functions only handle Latin-1 characters and break on emoji or non-Latin scripts. This tool uses TextEncoder and TextDecoder so anything UTF-8 round-trips cleanly — Chinese, Arabic, emoji, all of it.
Is my data private?
Yes. Encoding and decoding both run in your browser. There's no server endpoint, no analytics tracking your input. The complete source is open on GitHub.
Why is my decoded output garbled?
Two common reasons. (1) The input was binary data, not UTF-8 text — the bytes decode fine but don't form readable characters. Base64 is meant for binary; this tool only displays the result as text. (2) The Base64 string was URL-safe but you have Standard selected (or vice versa). The tool auto-detects URL-safe characters in the input, but explicitly setting the alphabet is more reliable.
Can I encode files?
Not yet — the input is text-only. For now, paste the file contents (text files) or a hex/string representation. File-input support may be added later if there's demand.

Related tools

The JWT Decoder handles the JWT-specific case (3 Base64url segments separated by dots), surfacing standard claims and expiration. The JSON Formatter is useful once you've decoded something that turns out to be JSON.