Base64 Encoder & Decoder
Encode plain text to Base64 or decode Base64 strings back to text. Fully UTF-8 compatible and 100% client-side — your data never leaves your browser.
About This Tool
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It is widely used in web development for encoding data that needs to be stored and transferred over media designed to deal with text. Common use cases include embedding images directly in HTML or CSS, encoding credentials for HTTP Basic Authentication, and transmitting binary data in JSON payloads.
This tool uses the browser's native btoa() and atob() functions with proper UTF-8 handling, so it correctly encodes and decodes non-ASCII characters, including emojis, Chinese characters, Arabic script, and other Unicode content that standard Base64 tools sometimes break.
All encoding and decoding happens locally in your browser. No data is transmitted to any server, making it safe to use with sensitive information such as passwords, tokens, or private configuration values.
Base64 encoding increases data size by approximately 33%, so it is not a compression method. It is purely a way to represent binary data as printable ASCII characters.
How to Use
- Select the Encode tab to convert plain text to Base64, or the Decode tab to convert Base64 back to plain text.
- Type or paste your input into the text area.
- Click the action button (Encode to Base64 or Decode from Base64).
- The result appears in the output text area below.
- Click Copy to copy the result to your clipboard.
- If you provide an invalid Base64 string when decoding, you will see a clear error message.
Common Use Cases
- Encoding API credentials for HTTP Basic Auth headers
- Embedding small images as data URIs in HTML or CSS
- Encoding binary data to pass in JSON or URL parameters
- Decoding Base64-encoded JWT payloads to inspect their contents
- Encoding configuration secrets in CI/CD environment variables