Base64 Encoder & Decoder

Encode text to Base64 and decode it back — UTF-8 safe, entirely in your browser.

How to use

  1. Paste your text — plain text to encode, or a Base64 string to decode.
  2. Click "Encode" or "Decode". Accents, emoji and any Unicode text are handled correctly (UTF-8 safe).
  3. Copy or download the result. The conversion happens locally — nothing is sent to any server.

About this tool

Base64 represents binary data using 64 printable characters (A–Z, a–z, 0–9, + and /), so it can travel safely through channels designed for text: JSON payloads, HTTP headers, data URIs, email attachments, basic authentication. Every 3 bytes of input become 4 characters of output, which is why Base64 is about 33% larger than the original data.

The classic JavaScript functions btoa and atob predate Unicode-aware strings and corrupt any character outside Latin-1 — the famous "Character Out Of Range" error with accents or emoji. This tool avoids that entirely by converting text through TextEncoder and TextDecoder, so "coração" and "🚀" encode and decode exactly as UTF-8 bytes, the behavior every modern API expects.

One thing Base64 is not: encryption. Encoding is a reversible representation, not a secret — anyone can decode it. Use it to transport data intact, never to protect it. Your input here never leaves the page, which makes the tool safe even for tokens and keys you are debugging.

The formula

Each group of 3 bytes (24 bits) is split into four 6-bit values, each mapped to one of 64 characters. Input not divisible by 3 is padded with "=" — that is why Base64 strings often end with = or ==.

Frequently asked questions

Is Base64 encryption?

No. It is a reversible encoding that anyone can decode. It protects data integrity in transport, not confidentiality.

Why does the output end with "="?

Padding. Base64 processes input in groups of 3 bytes; when the input length is not a multiple of 3, one or two "=" characters complete the final group.

Why do accents break with btoa in JavaScript?

btoa only accepts Latin-1 characters. Text must first be converted to UTF-8 bytes (TextEncoder) — exactly what this tool does for you.

Is my text sent to a server?

No. Encoding and decoding run entirely in your browser. The page makes no network requests with your data.

Related tools

Long links? Shorten them for free

Vai.la turns any URL into a short link with click statistics, QR Code and your own biolink.

Vai.la is not responsible for how the tools are used or for decisions made based on their results.