Base64 Encoder / Decoder
ConvertersEncode text to Base64 and decode it back
The Base64 Encoder / Decoder converts text to and from Base64 encoding. Base64 represents binary data using 64 printable ASCII characters (A–Z, a–z, 0–9, +, /) plus = padding. It is the standard way to embed binary content — images, fonts, certificates — inside text-only formats like JSON, XML, HTML, CSS and email, where raw bytes would be corrupted.
Common real-world uses include embedding small images directly in HTML or CSS as data URIs (which removes an extra HTTP request), transmitting binary payloads in JSON APIs, storing file contents in source code, and decoding data passed through URL parameters or email attachments (MIME).
This tool handles Unicode correctly. Naive use of the browser's built-in btoa/atob functions breaks on any character outside the Latin-1 range (for example emoji, Chinese, or accented letters). The tool first encodes the text as UTF-8 bytes, then Base64-encodes those bytes — so emoji, Cyrillic, Arabic and CJK text all round-trip perfectly. Decoding reverses the process.
The interface is bidirectional: type in the top box to encode, paste Base64 in the bottom box to decode. Invalid Base64 input is detected and reported clearly rather than producing garbled output. Everything runs locally in your browser, so sensitive payloads never leave your device.