Base64 Encoder/Decoder
Encode and decode Base64 with Unicode support
Unicode Support
Full support for emojis and special chars
100% Private
Runs entirely in your browser
No Signup
Free tool, no registration required
What Is Base64 Encoding?
Base64 is a binary-to-text encoding scheme that converts arbitrary binary data into a sequence of printable ASCII characters. It was designed to allow binary content — like images, audio files, or arbitrary byte streams — to travel safely through systems that were originally built to handle only plain text, such as email protocols (SMTP) and HTTP headers. The name comes from the 64-character alphabet it uses: A–Z, a–z, 0–9, and the symbols + and /, with = for padding.
Common Use Cases
Developers reach for Base64 in several everyday scenarios. Embedding fonts or small images directly into CSS as data URIs avoids extra HTTP requests and is standard practice in performance optimization. JWT (JSON Web Tokens) use Base64url — a URL-safe variant — to encode their header and payload sections. When uploading binary files through a JSON API, Base64 is often used to serialize the file content as a plain string field. Email attachments are Base64-encoded by MIME before transmission, and many configuration systems store binary secrets (like TLS certificates) as Base64 strings in environment variables or YAML files.
How to Use This Tool
Select "Encode" to convert plain text or any string to its Base64 representation, or "Decode" to reverse the process. Paste your input into the left textarea and click the Encode or Decode button — the result appears immediately on the right. Use the Swap button to flip the output back to the input for chained operations, and Copy to send the result to your clipboard. This tool uses JavaScript's TextEncoder API to handle multibyte Unicode characters correctly, so emoji and non-Latin scripts encode without data loss.
Technical Notes
Every 3 bytes of binary input produce exactly 4 Base64 characters, so encoded output is always roughly 33% larger than the original. When the input length isn't a multiple of three, padding characters (=) fill the remaining space. The URL-safe variant replaces + with - and / with _ to make it safe in query strings without further percent-encoding. All encoding and decoding in this tool runs entirely in your browser — nothing is uploaded to a server, so sensitive strings remain private.