Base64 Encoder

Encode text to Base64 or decode it back

Base64: Turn Text into a Safe, Portable Encoding

The 50-year-old standard for pushing binary data through text channels.

Base64 shows up everywhere: email attachments, API keys, data URLs, JWT tokens. Its purpose is transport, not secrecy — it converts any data into text made of just 64 safe characters (A-Z, a-z, 0-9, +, /), so binary content passes intact through systems that expect plain text. This tool works both ways: encode text to Base64, or decode a Base64 string back into readable text. All UTF-8 content is handled correctly, including accents and emoji — where many naive tools break on special characters, this one uses proper TextEncoder-based conversion. Everything runs in your browser; what you encode never reaches a server.

Features

🔄

Two-Way

Encode and decode on one screen, instantly.

🌍

Full UTF-8

Accents and emoji survive the round-trip intact.

⚡

Converts as You Type

No button needed — the result updates live.

🔒

Data Stays Yours

Conversion on your device, nothing uploaded.

Base64 Guide

Where it's used

  • Email attachments (MIME encoding)
  • Data URLs: data:image/png;base64,...
  • JWT token headers and payloads
  • API keys and simple config values

Need to know

  • Base64 is NOT encryption — anyone can decode it
  • It grows data by ~33% (3 bytes → 4 chars)
  • Trailing = signs are padding
  • The URL-safe variant swaps + and / for - and _

Frequently Asked Questions

Is Base64 encryption?

No — the most common misconception. Base64 is an encoding anyone can reverse; its goal is safe transport of binary data through text channels, not secrecy. For confidentiality, use real encryption such as AES.

Why do special characters break in some tools?

Naive tools call btoa directly, which only supports Latin-1 and fails or corrupts characters like é, ü or emoji. This tool first converts text to UTF-8 bytes and then encodes — the universally correct approach.

What do the trailing = signs mean?

They're padding: Base64 processes data in 3-byte blocks, and when the last block is short, the output is completed with =. Decoding handles them automatically — don't remove them by hand.

How much does Base64 grow the data?

By about a third: every 3 bytes become 4 characters. A 1 MB file becomes ~1.33 MB in Base64, which is why it's inefficient for moving large files.

Why does decoding report 'invalid data'?

The string may contain characters outside the Base64 alphabet (whitespace is cleaned automatically), be truncated, or use the URL-safe variant (with - and _). To decode URL-safe data, replace - with + and _ with / first.

Can I encode files?

This tool focuses on text. If you need images as data URLs, tell us — a file-to-Base64 version is an easy addition to our roadmap.