Base64 Encoder / Decoder

Encode & decode Base64 strings

ConvertersFreeNo Signup
4.7(628 reviews)
All Tools

Loading tool...

About Base64 Encoder / Decoder

A fast, browser-based Base64 encoder and decoder. Converts plain text to Base64 and back with full UTF-8 support, handles URL-safe Base64 variants, generates data URIs for embedding, and detects/validates Base64-encoded input automatically. All processing happens client-side — no data leaves your browser. Includes character count comparison showing the ~33% size overhead, and supports multiline input for large payloads. Essential for web developers, API integrators, email engineers, and anyone working with encoded data.

Base64 Encoder / Decoder Features

  • Encode & decode
  • UTF-8 safe
  • URL-safe variant
  • Auto-detection
  • Data URI output
Base64 encoding converts binary data into a text-safe format using 64 ASCII characters (A-Z, a-z, 0-9, +, /). It's used everywhere: email attachments (MIME), data URIs in HTML/CSS, JWT tokens, API authentication headers, and embedding binary data in JSON/XML. This tool encodes and decodes Base64 instantly in your browser with full Unicode/UTF-8 support.

How to Use

Choose Encode or Decode mode:

  • Encode: Paste text → get Base64 output
  • Decode: Paste Base64 → get original text
  • URL-safe: Toggle to use - and _ instead of + and /
  • Data URI: Generates a complete data:text/plain;base64,... URI

How Base64 Works

Base64 splits input into 6-bit groups (instead of 8-bit bytes), mapping each to one of 64 characters. Three bytes (24 bits) become four Base64 characters. If the input isn't a multiple of 3 bytes, = padding characters are added.

This means Base64 output is always ~33% larger than the input.

Base64 Variants

  • Standard (RFC 4648): A-Z, a-z, 0-9, +, / with = padding
  • URL-safe: Replaces + with - and / with _ (safe in URLs)
  • MIME: Standard + line breaks every 76 characters (email)

Step-by-Step Instructions

  1. 1Select Encode or Decode mode.
  2. 2Paste or type your input text.
  3. 3View the instant encoded/decoded output.
  4. 4Toggle URL-safe mode if needed for URLs or filenames.
  5. 5Copy the result or generate a data URI.

Base64 Encoder / Decoder — Frequently Asked Questions

Is Base64 encryption?+

No. Base64 is encoding, not encryption. It provides no security — anyone can decode a Base64 string. It's designed to safely transport binary data through text-only channels, not to hide information. Use proper encryption (AES, RSA) for security.

Why is Base64 output larger than the input?+

Base64 needs 4 characters to represent 3 bytes of data, a 33% overhead. This is because each Base64 character carries only 6 bits of information compared to 8 bits per byte. It's a trade-off for text-safety.

What does the = at the end mean?+

The = sign is padding. Base64 always produces output in groups of 4 characters. If the input byte count isn't a multiple of 3, one or two = signs are added to complete the final group. One = means 2 bytes in the last group, == means 1 byte.

Share this tool: