🔒 100% private — runs in your browser, nothing is uploaded

Base64 Encode / Decode

Encode text to Base64 or decode it back.

Base64 turns binary data into plain ASCII text, commonly used for embedding images in code, API tokens and email attachments.

How to use

  1. Paste text to encode, or Base64 to decode.
  2. Click the direction you need — the result appears below.
  3. Copy it with one click.

About this tool

Note: Base64 is encoding, not encryption — anyone can decode it. Never treat it as secure.

All processing happens locally in your browser.

How it works

Base64 turns binary data into plain ASCII text. It takes every 3 bytes (24 bits), splits them into four 6-bit groups, and maps each group to one of 64 characters: A–Z, a–z, 0–9, +, /. When the input length is not a multiple of 3, = padding is added so the output length is always a multiple of 4.

For example, 'Man' (bytes 4D 61 6E) becomes 'TWFu'. 'Ma' (2 bytes) becomes 'TWE=' — the missing byte is replaced by one = pad. Three input bytes always produce exactly four output characters, so Base64 output is roughly 33% larger than the input.

Base64 is encoding, not encryption — anyone can decode it instantly. It exists so binary data can travel through text-only channels: email attachments (MIME), data URIs in CSS and HTML, and JSON fields that must stay valid UTF-8.

Worked examples

A quick sanity check: Encode 'hello' and you get 'aGVsbG8=' — five input bytes become eight output characters with a single = pad. Decode it back and you get 'hello' again, byte for byte.

Binary data inside JSON: An API returning a small thumbnail can embed it as {"thumb": "iVBORw0KGgo..."} instead of a second download — the client decodes the string back to image bytes.

Quick reference

Input bytesOutput charsPadding
34none
24one =
14two ==

The 64-character alphabet: A–Z map to values 0–25, a–z to 26–51, 0–9 to 52–61, then + is 62 and / is 63.

Frequently asked questions

Is Base64 encryption?

No — it is just an encoding. Anyone can decode Base64, so never use it to "protect" secrets.

Does it support emoji and Chinese characters?

Yes — this tool handles full Unicode correctly.

Is my input uploaded?

No. Everything runs in your browser.

📦 Embed this tool on your site

<iframe src="https://verystep.com/embed/base64/" title="Base64 Encode / Decode" width="100%" height="520" loading="lazy" style="border:0"></iframe>

Free to use. The embed shows a small "Powered by Verystep" link.

More free tools