Base64 Encode / Decode
Encode and decode Base64 strings instantly in your browser. UTF-8 safe.
About Base64 Encode / Decode
Convert any text or string to Base64 encoding, or decode a Base64 string back to plain text. Handles Unicode and UTF-8 characters correctly. Commonly used to encode binary data for JSON payloads, HTTP headers, and email attachments. Runs 100% client-side — safe to paste tokens, credentials, or sensitive strings.
All processing happens entirely in your browser using modern web APIs. Nothing is uploaded to our servers — your data stays local and private. Free to use forever.
Common use cases
- Encoding API credentials for HTTP Basic Authentication headers
- Embedding small images or fonts as Base64 data URIs in CSS/HTML
- Decoding JWT payloads and email MIME parts
- Encoding binary data to safely transmit in JSON or XML
- Debugging Base64-encoded values from logs or API responses
How it works
For encoding, the tool uses encodeURIComponent + btoa to correctly handle UTF-8 characters beyond ASCII. For decoding, it reverses the process with atob + decodeURIComponent. This ensures emoji, accented characters, and CJK characters all round-trip correctly — a common failure point in naive btoa() implementations.