🧰Tools 🗜️ Compression🔄 Conversion✏️ Editing📄 PDF Tools⚡ Optimization🌐 Web Tools🧰 All Tools (69)
📱 Android App 📝 Blog 👋 About

Web Tools · Free · No signup

Encode & Decode Base64 Text — Unicode Included

Convert text to Base64 and back with correct, standard-compliant handling of the tricky cases: accents, emoji and any non-Latin characters (real UTF-8 encoding, not the naive btoa that throws on “🐼”). Choose URL-safe output for query strings and tokens, decode Base64 that arrived from an API, and swap input and output in one click to chain operations. Every byte is processed by your browser — nothing is transmitted.

Encode = text → Base64 · Decode = Base64 → text. Swap flips mode and direction.

🔒 100% private: everything runs inside your browser — nothing is uploaded, stored or logged.

How it works

  1. Paste your text or Base64 string into the input box.
  2. Pick Encode (text → Base64) or Decode (Base64 → text); toggle URL-safe if the result goes in a URL.
  3. Press Convert — the result appears instantly in the output box.
  4. Use Swap to move the result into the input with the mode flipped, then Convert again to round-trip.

Features

True UTF-8 support

Accents, CJK, emoji — encoded and decoded byte-perfectly via TextEncoder/TextDecoder, where naive tools crash or corrupt.

URL-safe alphabet

Optional - and _ instead of + and / for JWT-style tokens and query parameters.

One-click swap

Chain operations: encode, swap, decode — verify a round-trip in two clicks.

Tolerant decoding

Spaces and newlines inside pasted Base64 are stripped automatically; missing padding is fixed.

100% local

All conversion is browser JavaScript. Passwords, tokens and payloads never leave the tab.

Input & output. Input: any UTF-8 text (encode) or a Base64 string in standard or URL-safe alphabet, with or without padding (decode). Output: Base64 text or decoded UTF-8 text.

Common use cases

Limitations (honest ones)

Base64 is an encoding, not encryption — anyone can decode it, so never treat Base64 as protection for secrets. Decoding assumes the input is valid UTF-8: binary files decoded here will show replacement characters (use our Image to Base64 / Base64 to Image tools for images). Extremely long strings (tens of MB) are limited by browser memory.

Frequently asked questions

Why do other Base64 tools fail on emoji?

They call btoa() directly, which only accepts characters up to byte 255. Emoji are multi-byte UTF-8. This tool encodes the string to UTF-8 bytes first, then Base64 — the standard-compliant way.

Is Base64 encryption?

No. It is a reversible, key-free encoding whose only purpose is safe transport through text-only channels. Anyone can decode it — use real cryptography for secrecy.

Why does my decoded string look like garbage?

Either the input was not valid Base64 (typos, line breaks from email wrapping) or it encoded binary data, not text. The tool auto-strips whitespace and fixes padding before decoding.

What does URL-safe mean?

Standard Base64 uses + and /, which have special meanings in URLs. The URL-safe alphabet replaces them with - and _. JWTs use it by default.

How much bigger does Base64 make my data?

About 33%: every 3 bytes become 4 characters, plus optional padding. That is the cost of carrying binary through text channels.

Keep going

Related tools

CompressoPanda Android app icon

On mobile?

Working from your phone?

This tool runs in any mobile browser — no app needed. And for the image & PDF side of the toolbox, the CompressoPanda Android app ships 36 tools that run with no connection at all: compression to target size, editing and PDF essentials included.