Ctrl + K
Developer

Base64 Encoder / Decoder

Encode plain text to Base64 format or decode Base64 encoded strings back to readable text.

Plain Text 0 chars
Base64 Output

Enter text above to see the encoded result

Base64 to Image Converter

Convert Base64 data URIs back into viewable images →

All encoding and decoding happens locally in your browser. Your data is never sent to any server, cached, or stored. Full UTF-8/Unicode support for international characters and special symbols.

Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It is everywhere on the web — embedded images, email attachments, API authentication tokens, and data URIs all rely on Base64. Our free Base64 encoder and decoder lets you instantly convert between plain text and Base64, or decode Base64 strings back to their original form, with full UTF-8/Unicode support. All processing runs locally in your browser with zero data uploads.

What Is Base64?

Base64 encodes binary data into a set of 64 printable characters (A–Z, a–z, 0–9, +, /) plus the padding character (=). It is defined in RFC 4648 and widely used to safely transmit binary data over text-based protocols like HTTP, SMTP, and JSON. Because Base64 only uses characters guaranteed to survive most transport layers, it is ideal for embedding images in HTML/CSS, encoding file contents in REST APIs, and storing binary-safe values in JSON configurations.

How to Use the Base64 Tool

  1. Choose your mode — Click Encode to convert text to Base64, or Decode to convert Base64 back to text.
  2. Enter your input — Type or paste the content you want to encode or decode into the input textarea.
  3. Read the result — The output panel updates instantly in real time as you type. Valid output appears in green; errors appear in red.
  4. Swap modes — Click the Swap button to send the output back to the input and switch modes — perfect for round-trip testing.
  5. Copy or clear — Use Copy to grab the result, or Clear to start fresh.

Key Features

  • Real-Time Conversion

    Encode and decode instantly as you type — no buttons to press.

  • UTF-8 / Unicode Support

    Handles international characters, emojis, and special symbols correctly.

  • Encode & Decode Modes

    Toggle between encoding and decoding with a single click.

  • Smart Swap

    Send output to input and flip modes for round-trip verification.

  • Error Feedback

    Clear error messages for invalid Base64 or encoding issues.

  • 100% Private

    All processing runs client-side. Nothing is sent to any server.

Common Use Cases

  • Data URIs: Encode images as inline Base64 strings to embed directly in HTML or CSS, reducing HTTP requests.
  • API Authentication: Encode username:password pairs for HTTP Basic Auth headers.
  • Email Attachments: Base64 is the standard encoding for binary file attachments in MIME email messages.
  • JWT Tokens: Decode the header and payload segments of JSON Web Tokens (each is Base64URL-encoded).

Frequently Asked Questions

What is Base64 used for?
Base64 is primarily used to transmit binary data over text-based channels. Common uses include embedding images in HTML, encoding credentials in HTTP Basic Auth, and representing binary content in JSON or XML payloads.
Why is Base64 larger than the original?
Base64 encodes 3 bytes of binary data into 4 ASCII characters, resulting in a ~33% size increase. This overhead is the trade-off for guaranteed safe transmission over text-only protocols.
Does this tool support UTF-8 characters like emojis?
Yes. The browser's native btoa and atob functions only support Latin-1, but our tool converts UTF-8 to a safe format before encoding, and restores it after decoding — so emojis, accents, and CJK characters all work correctly.
Is Base64 encryption?
No. Base64 is an encoding scheme, not encryption. It transforms data for safe transport, not for secrecy. Anyone can decode Base64 instantly. Never use Base64 to protect sensitive data — use proper encryption (like AES) for that purpose.

Related Tools