Base64 Encoder/Decoder

Encode text to Base64 or decode Base64 strings instantly.

Convert plain text to Base64 encoding or decode Base64 strings back to readable text. This tool supports UTF-8 characters and URL-safe encoding.

All processing happens in your browser - your data is never sent to our servers.

0 characters

What is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It's commonly used to:

  • Embed binary data (like images) in HTML, CSS, or JSON
  • Transmit data over channels that only support text
  • Store complex data in cookies or URL parameters
  • Encode email attachments (MIME)
  • Encode authentication credentials (Basic Auth)

How It Works

Base64 encoding converts every 3 bytes of binary data into 4 ASCII characters from a 64-character alphabet (A-Z, a-z, 0-9, +, /). This means encoded data is approximately 33% larger than the original.

URL-Safe Base64

Standard Base64 uses + and / characters which have special meaning in URLs. URL-safe Base64 replaces:

  • + with - (minus)
  • / with _ (underscore)
  • Removes trailing = padding

Common Use Cases

Data URIs

Embed images directly in HTML/CSS using Base64 encoded data URIs.

API Authentication

Basic Authentication headers use Base64 to encode credentials.

Security Note

Base64 is not encryption. It's easily reversible and provides no security. Never use Base64 alone to protect sensitive data - use proper encryption instead.

Related Tools

Quick Reference

Character Set A-Za-z0-9+/
Padding =
Size Increase ~33%
URL-Safe Chars -_