Base64 Encoder/Decoder
Encode and decode Base64 strings with full Unicode support
How to Encode and Decode Base64
Converting text to and from Base64 is simple with this free online tool:
- Select your mode -- choose "Encode" to convert text to Base64, or "Decode" to convert Base64 back to readable text.
- Enter your input -- paste or type your text (or Base64 string) into the input area.
- Click Convert -- the result appears instantly in the output area.
- Copy the result -- click the Copy button to save it to your clipboard.
Everything runs entirely in your browser -- no data is sent to any server, so your content stays private.
What is Base64 Encoding?
Base64 is a binary-to-text encoding scheme that represents binary data using a set of 64 printable ASCII characters (A-Z, a-z, 0-9, +, and /). It was designed to safely transmit binary data over channels that only support text, such as email (MIME) and URLs.
The encoding works by taking groups of three bytes (24 bits) and splitting them into four 6-bit
values, each mapped to a character in the Base64 alphabet. If the input length isn't a multiple of
three, padding characters (=) are appended to the output.
This tool handles Unicode text by first encoding the input as UTF-8 bytes using the
TextEncoder API, then converting those bytes to Base64. Decoding reverses the process,
ensuring full support for accented characters, emoji, and any Unicode text.
Frequently Asked Questions
What is Base64 used for?
Base64 is commonly used to embed binary data in text-based formats. Typical use cases include encoding images or files as data URIs in HTML/CSS, transmitting binary attachments in email (MIME), encoding credentials in HTTP Basic Authentication headers, and storing binary data in JSON or XML payloads. It is also widely used in APIs and configuration files where binary-safe transport is needed.
Does Base64 encrypt data?
No. Base64 is an encoding, not encryption. It transforms data into a different representation but provides zero security -- anyone can decode a Base64 string instantly. Never use Base64 to hide sensitive information like passwords, API keys, or personal data. If you need to protect data, use proper encryption (e.g., AES or RSA) instead.
Can Base64 handle special characters?
Yes. This tool fully supports Unicode, including accented characters (e.g., cafe), CJK characters, emoji, and other multi-byte sequences. The input text is first encoded to UTF-8 bytes before Base64 encoding, and decoding reverses this process, preserving all characters accurately.
Base64 to UTF-8 Conversion Explained
One of the most common Base64 use cases is converting Base64 to UTF-8 text. UTF-8 is the modern standard for text encoding and supports every character in every language plus emoji. When you decode a Base64 string with this online tool, the process is:
- The Base64 string is converted into a sequence of raw bytes
- Those bytes are interpreted as UTF-8 encoded text
- The decoded text is displayed in the output area
This means you can paste any Base64 string from an email header, JWT payload, JSON document, or API response, and our online Base64 encoder/decoder tool will give you back the original UTF-8 text instantly.
Encoding Text to Base64
Encoding works in reverse. Type or paste your text into the input — including any UTF-8 characters like accents, Chinese, Cyrillic, Arabic, or emoji — and click Encode. The tool converts your text to UTF-8 bytes, then to a Base64 string. The result can be safely transmitted in any text-based format (HTTP headers, URL parameters, JSON, XML, email).
Common Base64 Encoder/Decoder Use Cases
Developers and IT professionals use online Base64 tools for many tasks:
- Embedding images in HTML/CSS via Data URIs (e.g.,
data:image/png;base64,iVBORw0KGgo...) - Decoding JWT tokens — the header and payload of JSON Web Tokens are Base64-encoded JSON
- HTTP Basic Authentication — username:password is Base64-encoded in the Authorization header
- Email attachments (MIME) — binary files are Base64-encoded for SMTP transmission
- API binary payloads — sending binary data inside JSON which only supports text
- Configuration files — embedding small binary blobs in YAML, JSON, or XML
- Encoding config secrets for Kubernetes, environment variables (note: Base64 is NOT encryption)
Base64 Character Set
Standard Base64 uses 64 printable ASCII characters: A-Z (26), a-z (26), 0-9 (10), plus + and / (2). The = character is used for padding when the input length is not a multiple of 3 bytes. URL-safe Base64 replaces + with - and / with _ so the value can be safely used in URLs and filenames.
How big does my data get when Base64-encoded?
Base64 encoding always increases data size by approximately 33%. Specifically, every 3 bytes of input become 4 characters of output. So a 1 KB file becomes about 1.33 KB when Base64-encoded. This overhead is the cost of binary-safe text transmission.
Is this Base64 tool safe to use with sensitive data?
Yes. All encoding and decoding happens entirely in your browser using JavaScript. Your input never leaves your computer — no data is uploaded to any server. You can verify this by disconnecting from the internet after the page loads; the tool continues to work. However, remember that Base64 is encoding, not encryption — anyone with the encoded string can decode it.