Base64 Encoder/Decoder: Convert Text to Base64 Online

Convert text to Base64 encoding or decode Base64 strings back to readable text with our free online converter. Base64 is a way to represent binary data (like images or files) as plain text using only letters and numbers. It's commonly used for embedding images directly in web pages (data URLs), sending files via email, storing data in JSON, and working with API authentication tokens.

Simply paste your text to encode it to Base64, or paste Base64 to decode it back to normal text. Supports UTF-8 encoding for international characters and special symbols. See instant conversion as you type. Copy results with one click. Perfect for developers working with APIs, email attachments, or data URLs. All encoding and decoding happens locally in your browser—no data sent to any server.

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 encode data that needs to be stored or transferred over media designed to deal with text, such as email, JSON, or XML.

Common Use Cases:

  • Embedding images in HTML or CSS (Data URLs)
  • Encoding binary data in JSON or XML
  • Email attachments (MIME encoding)
  • HTTP Basic Authentication headers
  • Storing binary data in text-based databases
  • JWT tokens and API keys

How Base64 Works:

Base64 encoding takes binary data and converts it into a set of 64 printable ASCII characters:

  • A-Z: Uppercase letters (26 characters)
  • a-z: Lowercase letters (26 characters)
  • 0-9: Digits (10 characters)
  • + and /: Two additional characters
  • =: Padding character

Example:

Plain Text:

Hello, World!

Base64 Encoded:

SGVsbG8sIFdvcmxkIQ==

Features:

  • UTF-8 support for international characters
  • Real-time encoding/decoding as you type
  • Error handling for invalid Base64 input
  • One-click copy to clipboard
  • Paste button for quick input
  • 100% client-side - your data never leaves your browser

Important Notes:

  • Not encryption: Base64 is encoding, not encryption. Anyone can decode it.
  • Size increase: Base64 encoding increases data size by approximately 33%.
  • Line breaks: This tool removes whitespace when decoding for convenience.

Frequently Asked Questions

What is Base64 encoding? +

Base64 is a binary-to-text encoding scheme that converts binary data into a string of ASCII characters. It uses 64 characters (A-Z, a-z, 0-9, +, /) to represent data. Base64 is commonly used when you need to transmit binary data over systems designed for text, like embedding images in HTML or sending data in JSON.

Is Base64 encryption? +

No, Base64 is encoding, not encryption. It doesn't provide any security—anyone can decode Base64 data instantly. Its purpose is to safely represent binary data as text, not to hide information. For security, use actual encryption (AES, RSA) before Base64 encoding if needed.

Why does Base64 make data larger? +

Base64 encoding increases data size by approximately 33%. This is because 3 bytes of binary data become 4 Base64 characters. The trade-off is that the encoded data can safely pass through text-based systems that might corrupt raw binary data.

What is a data URL and how does Base64 relate to it? +

A data URL (data:image/png;base64,...) embeds file content directly in HTML or CSS instead of linking to a separate file. The file's binary content is Base64-encoded to create a text string. This eliminates extra HTTP requests but increases HTML size. Best for small images and icons.

How do I handle special characters and UTF-8? +

Our encoder properly handles UTF-8 characters (emojis, non-Latin scripts) by first converting the text to UTF-8 bytes, then Base64 encoding those bytes. When decoding, the process is reversed. This ensures characters like '你好' or '👋' encode and decode correctly.