Base64 Encoder / Decoder
Encode and decode Base64 text safely, including Unicode characters.
Paste or type your text into the input area. Choose Encode to turn it into Base64, or Decode to turn Base64 back into plain text.
The encoder is Unicode-safe: it first converts the text to UTF-8 bytes, then encodes those bytes to Base64. The decoder reverses that process. Invalid Base64 input shows a clear error message instead of a broken result.
Click the Copy button to copy the output to your clipboard. No data is sent to a server.
Frequently asked questions
What is Base64 used for?
Base64 turns binary or text data into a plain ASCII string. It is commonly used in data URLs, JSON tokens, email attachments and embedding images.
Why do some Base64 tools fail on Chinese or emoji text?
They often call btoa directly on Unicode strings, which fails. This tool encodes UTF-8 bytes first, so it handles any Unicode text correctly.
Does Base64 output include a data URI prefix?
No. The output is the raw Base64 string. If you need a data URI, you can prepend data:text/plain;base64, manually.