Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 back to text instantly. Supports full UTF-8, auto-detects mode, and runs entirely in your browser.

Paste any text to encode it as Base64, or paste a Base64 string to decode it back to readable text. The tool auto-detects whether your input looks like Base64 and suggests the right action. Full UTF-8 support means emojis, accented characters, and CJK text all work correctly.

When to Use the Base64 Encoder/Decoder

Use Base64 encoding when embedding binary content in JSON, passing data through URL-safe channels, encoding email attachments, or debugging API payloads that contain Base64 strings.

Tips

  • Use Base64 to embed small images directly in CSS as data URIs — saves an HTTP request.
  • If your decoded output looks garbled, the original text may not have been UTF-8 encoded before Base64 encoding.
  • Base64 strings always have a length divisible by 4. If not, they may be truncated.
  • For URL-safe Base64, replace + with - and / with _ after encoding.

Frequently Asked Questions

What is Base64 encoding?

Base64 converts binary data into a set of 64 ASCII characters (A-Z, a-z, 0-9, +, /). It is commonly used to embed images in HTML/CSS, send binary data in JSON, and encode email attachments.

Does Base64 encrypt my data?

No. Base64 is an encoding, not encryption. Anyone can decode it. Never use Base64 to hide passwords or sensitive data — it provides zero security.

Why is the Base64 output longer than the input?

Base64 increases size by approximately 33% because it represents every 3 bytes of input as 4 ASCII characters. This is the trade-off for safe ASCII transport.

Does it handle Unicode and emojis?

Yes. We encode the text as UTF-8 before Base64 encoding, so characters from any language and emojis are preserved correctly on decode.

Is my data sent to a server?

No. All encoding and decoding happens in your browser using the built-in btoa/atob functions with a UTF-8 wrapper. Nothing is transmitted.

Related Tools