Base64 Encoder & Decoder
Encode plain text to Base64 or decode Base64 strings. Unicode-safe. All processing happens in your browser.
Plain Text
Base64 Output
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, plus (+), and slash (/), with equals (=) used for padding. It was designed to safely transmit data through systems that were built to handle text, not raw binary.
When you encode text to Base64, each group of three bytes is converted into four Base64 characters, resulting in an output that is roughly 33% larger than the original but safe to use anywhere ASCII text is accepted — URLs, HTML attributes, JSON values, HTTP headers, and more.
Our Base64 Encoder & Decoder is Unicode-safe, meaning it correctly handles international characters, accented letters, and even emoji. Everything runs in your browser — no data is ever sent to a server.
How to Use the Base64 Tool
To encode: Select “Encode”, paste your plain text into the left panel, then click Encode or press Cmd+Enter (Mac) / Ctrl+Enter (Windows/Linux)
To decode: Switch to “Decode”, paste your Base64 string into the left panel, then click Decode or use the keyboard shortcut
Copy the output: Use the copy icon on the output panel to copy the result to your clipboard
Clear: Click Clear to reset both panels and start fresh
💡 All processing happens in your browser — your data never leaves your device.
Common Use Cases
• API Authentication
HTTP Basic Auth sends credentials as Base64-encoded username:password. Use this tool to encode credentials for testing or to decode auth headers you encounter during debugging.
• JWT Token Inspection
JSON Web Token payloads and headers are Base64url-encoded. Decode the header or payload segment to inspect claims without a dedicated JWT tool.
• Data URI Preparation
Embed small text content directly in HTML or CSS using data URIs. Encode the content to Base64, then use it in a data:text/plain;base64, URI.
• Configuration & Secrets
Many CI/CD systems and Kubernetes configs store secrets as Base64-encoded strings. Quickly encode or decode values when setting up pipelines or reviewing configs.
• Debugging Encoded Payloads
When an API returns a Base64-encoded string in a response field, paste it here to immediately see the underlying content without writing a decode script.
Key Features
✓ Unicode & Emoji Safe
Correctly handles international text, accents, and emoji
✓ Encode & Decode
Toggle between modes instantly — no page reload
✓ Clear Error Messages
Invalid Base64 input shows a descriptive error, not a crash
✓ 100% Private
Client-side only — your text never leaves your browser
Frequently Asked Questions
Is my data safe and private?
Yes. All encoding and decoding is handled by native browser APIs (btoa and atob). Nothing is sent to any server. It is safe to use with passwords, API keys, tokens, or any sensitive text.
Does it support Unicode and emoji?
Yes. The encoder uses encodeURIComponent before btoa() to safely handle Unicode characters, accented letters, CJK characters, and emoji. The decoder reverses this with atob() and decodeURIComponent. Standard btoa() alone would fail on non-ASCII text.
What is Base64 used for?
Base64 is used to safely transmit binary or text data through text-based systems. Common uses include HTTP Basic Auth headers, JWT token payloads, embedding images in HTML and CSS as data URIs, storing binary content in JSON, and encoding secrets in Kubernetes and CI/CD configuration.
What happens if I decode invalid Base64?
The tool displays a clear error message explaining that the input is not valid Base64. Valid Base64 only contains A–Z, a–z, 0–9, + and /, with = used for padding at the end. Spaces and line breaks in the input may also cause decoding to fail.