Base64 Encode & Decode

What is Base64 encoding?

Base64 is a way to represent binary data as plain ASCII text, using 64 characters (A–Z, a–z, 0–9, + and /). It is used to embed images in web pages, send binary data in JSON and APIs, and encode credentials. This tool is Unicode-safe, so Chinese characters and emoji round-trip correctly.

🔒 Runs 100% in your browser — your text never leaves your device.
Your result will appear here.

How to encode and decode Base64

  1. Type or paste your text: Enter the text to encode, or the Base64 string to decode — Chinese and emoji work too.
  2. Click Encode or Decode: Encode to Base64 turns text into Base64; Decode from Base64 turns it back into text.
  3. Read the result: The output appears in the result box below the buttons.
  4. Copy the output or clear: Use Copy output to copy the result, or Clear to start over.

Base64 vs hexadecimal

EncodingAlphabetSize overheadTypical use
Base6464 characters (A–Z, a–z, 0–9, +, /)About 33% largerData URIs, APIs, email attachments
Hexadecimal16 characters (0–9, a–f)100% larger (2×)Hashes, checksums, debugging

Both are encodings, not encryption — either can be decoded by anyone.

Frequently asked questions

How do I decode Base64 to text?

Paste the Base64 string into the box and click Decode from Base64. The original text appears in the result box below. If the string is not valid Base64 — for example, it contains characters outside the Base64 alphabet — the tool shows an error instead. Whitespace in the input is ignored, so you can paste wrapped or multi-line Base64.

Is Base64 encryption?

No. Base64 is an encoding, not encryption: anyone can decode a Base64 string instantly, so it provides no secrecy at all. It exists to represent binary data as safe ASCII text for transport, not to hide information. Never use Base64 to protect passwords, tokens or private data — use real encryption for that.

Does it handle Chinese characters and emoji?

Yes. The tool first encodes text as UTF-8, so Chinese characters, emoji and every other Unicode symbol round-trip correctly. The browser's built-in btoa() function breaks on non-ASCII text, which is why this tool uses TextEncoder and TextDecoder instead. Try it with “你好世界 👋” to see it work. Decoding works the same way in reverse, so encoded text always decodes back to exactly what you typed.

What is Base64 used for?

Base64 is used wherever binary data must travel as text: embedding small images directly in web pages (data URIs), sending files in JSON APIs, encoding email attachments, and HTTP Basic authentication. It makes binary data safe for systems that only handle text, at the cost of making the data about 33% larger.