Base64 Encoder & Decoder

Encode text to Base64 or decode Base64 strings back to text. Supports URL-safe encoding and auto-detection.

Input

13 chars

Output

Click Encode or Decode to see results

What is Base64?

Base64 is a group of binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. It is commonly used to embed binary data (like images or other files) within text-based formats such as JSON, XML, or email. It ensures that the data remains intact without modification during transport.

This tool provides a fast and secure way to encode and decode Base64 strings entirely within your browser, ensuring your data privacy.

How to Use This Tool

  1. Input: Paste your text or Base64 string into the "Input" textarea.
  2. Encode/Decode: Click "Encode" to convert plain text to Base64, or "Decode" to convert a Base64 string back to plain text.
  3. URL-Safe: Check the "URL-Safe" option if you need to encode/decode Base64 strings that are safe for use in URLs (replaces `+` with `-` and `/` with `_`).
  4. Auto-Detect: The tool will attempt to detect if your input is a valid Base64 string.
  5. Stats: View character counts and size comparisons to understand the encoding overhead.

Common Use Cases

  • Embedding Data: Embed small images or other binary assets directly into HTML, CSS, or JSON.
  • Email Attachments: Base64 is often used to encode email attachments for reliable transmission.
  • API Tokens: Encode API keys or authentication tokens for safe transmission in HTTP headers or URLs.
  • Data Obfuscation: Simple obfuscation of data (not encryption) for storage or transmission.
  • Cross-Platform Compatibility: Ensure data integrity when transferring between systems with different character encoding standards.