Base64 Text Encoder / Decoder

Encode plain text to Base64 and decode Base64 back to text instantly. Supports URL-safe Base64 and full UTF-8. Pure client-side.

Quick Examples

About Base64 Text Encoder / Decoder

Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It is commonly used when there is a need to encode binary data that needs to be stored and transferred over media that are designed to deal with textual data. This tool allows you to encode any text into Base64 format and decode Base64 strings back to plain text. All processing happens in your browser — no data is ever sent to a server.

Features

How to Use

  1. Select the mode: Encode (text → Base64) or Decode (Base64 → text)
  2. Choose the variant: Standard Base64 or URL-safe Base64
  3. Type or paste your text into the input field
  4. The result appears automatically in real time
  5. Click Copy to copy the result to your clipboard
  6. Use the Swap button to reverse the operation

Common Use Cases

Frequently Asked Questions

What is Base64 encoding?

Base64 is a binary-to-text encoding scheme that represents binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /, and = for padding). It is commonly used to encode data that needs to be transmitted or stored in text-based formats, such as JSON, XML, or URLs.

What is the difference between Standard and URL-safe Base64?

Standard Base64 uses + and / characters, which can cause issues in URLs because they have special meanings. URL-safe Base64 replaces + with - and / with _, and often omits padding (=), making it safe to use in URLs and filenames without additional encoding.

Is my data safe when using this tool?

Yes, absolutely. All encoding and decoding happens entirely in your browser using JavaScript. Your text is never sent to any server, making it completely safe for sensitive data like passwords, API keys, and personal information.

Can I encode non-English characters?

Yes, this tool supports full UTF-8 encoding. You can encode text in any language, including Chinese, Japanese, Arabic, Emoji, and special symbols. The tool uses TextEncoder internally to properly handle multi-byte characters.

What does the URL-safe variant do?

URL-safe Base64 replaces the + and / characters with - and _ respectively, and removes padding (=). This makes the encoded string safe to use directly in URLs, query parameters, and filenames without needing additional percent-encoding.

Why is my decoded output garbled or showing strange characters?

This usually happens when the input is not valid Base64, or when the original text was encoded with a different character set. Make sure you are using the correct mode (Encode vs Decode) and that your input follows valid Base64 format (only A-Z, a-z, 0-9, +, /, -, _, and = characters).

Can I encode binary files with this tool?

This tool is designed for text encoding. For binary files (images, PDFs, etc.), use our dedicated File to Base64 tool or Image to Base64 tool, which handle binary data properly.

What are the output statistics showing?

The statistics panel shows the length of your input text, the length of the output, and the byte size of each. This is useful for understanding how Base64 encoding affects data size (Base64 is roughly 33% larger than the original binary data).