Base64 Encoder / Decoder

Encode or decode Base64 instantly

Input: 0 chars Output: 0 chars

Free Base64 encoder & decoder — UTF-8 safe, browser-based

Toololis Base64 Encoder/Decoder converts between plain text and Base64 entirely in your browser. Full UTF-8 support means emojis, accented letters, and non-Latin scripts encode and decode correctly. No server round-trips, no logging — your data stays on your device.

What Base64 is used for

  • Email attachments — Binary files embedded in plain-text email (MIME)
  • Data URLs — Inlining images directly into CSS or HTML (data:image/png;base64,…)
  • JWT tokens — The three parts of a JWT are Base64-URL-encoded JSON
  • Basic authentication — HTTP headers like Authorization: Basic <base64(user:pass)>
  • API keys in URLs — When a key contains special characters
  • Storing binary in JSON — Since JSON can\'t hold raw bytes

How to use this tool

  1. 1

    Choose a direction

    Toggle between Encode (plain text → Base64) and Decode (Base64 → plain text).

  2. 2

    Paste your input

    Type or paste text. UTF-8 is fully supported — emojis, accented letters, Asian scripts all work. The tool detects invalid Base64 and shows a clear error.

  3. 3

    Copy the result

    Output updates live. Click Copy to send it to your clipboard, ready to drop into an API request, email, or config file.

Base64 is NOT encryption

Base64 is reversible by anyone in under a second. It is encoding, not encryption. Never use Base64 to protect passwords, API keys, or private data. For privacy, use real encryption like AES-256 (try our coming-soon AES Encrypt tool) and pair with a secure key exchange.

Output size

Base64 encoding grows your data by approximately 33%. A 100-byte input produces a ~136-byte Base64 string. This is the trade-off for transporting binary data through text-only channels.

Frequently Asked Questions

What is Base64 encoding?
Base64 is a way to encode binary data (or text) using only 64 ASCII characters: A-Z, a-z, 0-9, +, /, and = for padding. It's used when you need to transport binary data through text-only channels like email, JSON, or URLs.
Is Base64 encryption?
No. Base64 is encoding, not encryption. Anyone can decode Base64 in one second. Never use it to "hide" passwords or sensitive data. Use real encryption (AES, RSA) for privacy.
How does Base64 handle UTF-8?
This tool uses TextEncoder / TextDecoder to handle UTF-8 correctly. Non-ASCII characters (é, ü, 中, 🎉) are converted to their UTF-8 byte sequences before encoding, and restored properly on decode.
Why does my Base64 end with = or ==?
The = characters are padding. Base64 groups input into chunks of 3 bytes → 4 characters. If your input isn't a multiple of 3 bytes, padding fills the gap. One trailing = means the input was 2 bytes short; two means 1 byte short.
What's URL-safe Base64?
Standard Base64 uses + and / which have special meaning in URLs. URL-safe Base64 replaces them with - and _, and sometimes omits padding. This tool uses standard Base64. For URL-safe, manually replace +-, /_.
Can I encode images or files?
This version only handles text. For images, use a "Base64 Image Encoder" (coming soon to toololis). Dragging a file into a text box paste-encodes is not supported.
Is my input private?
100%. Everything runs in your browser using btoa, atob, and the TextEncoder API. No data leaves your device. Safe for API keys, tokens, and sensitive payloads.

You might also like

🔒
100% Privacy. This tool runs entirely in your browser. Your data is never uploaded to any server.