Base64 Encoder/Decoder

Encode and decode Base64 strings with full Unicode support

What is Base64 Encoder/Decoder?

Base64 Encoder/Decoder is a free online tool that converts text to Base64 encoding and decodes Base64 strings back to text. It fully supports Unicode characters including emoji, Korean, Chinese, Japanese, and other non-ASCII characters. Base64 encoding is essential for embedding binary data in text-based formats like JSON, XML, HTML, and email. This tool offers additional options including URL-safe encoding (replacing + with - and / with _), padding removal, and line break insertion for MIME compatibility. All encoding and decoding happens in your browser using the Web API, ensuring your data stays completely private. Whether you are working with API authentication, data URIs, email attachments, or file encoding, this tool provides fast and accurate Base64 conversion.

How to Use

  1. Enter text or a Base64 string in the input area.
  2. Click 'Encode' to convert text to Base64.
  3. Click 'Decode' to convert Base64 back to text.

Tips & Best Practices

  • Use URL-safe mode when encoding data for use in URLs or file names.
  • Enable line breaks at 76 characters for MIME-compatible Base64 used in email encoding.
  • Remember that Base64 encoding increases data size by approximately 33%.
  • Use Base64 to embed small images directly in HTML or CSS as data URIs.
  • When decoding, if you see garbled text, the original may have been encoded with a different character set.

Use Cases

API Authentication

Encode credentials for HTTP Basic Authentication headers.

Data URIs

Convert small images to Base64 for inline embedding in HTML and CSS.

Email Encoding

Encode binary attachments for MIME email messages.

Data Transfer

Safely transmit binary data through text-only channels like JSON APIs.

FAQ

What is Base64 encoding?

Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format, commonly used in email and web data transfer.

Does it support Unicode characters?

Yes, this tool uses TextEncoder/TextDecoder to properly handle Unicode characters including emoji and CJK characters.

What is URL-safe Base64?

URL-safe Base64 replaces + with - and / with _, making it safe for use in URLs and filenames without additional encoding.

Is my data sent to any server?

No, all encoding and decoding is performed in your browser and no data is transmitted externally.

How much does Base64 encoding increase the data size?

Base64 encoding produces output roughly 33% larger than the original, because every 3 bytes of input become 4 Base64 characters.

Can I encode Korean or special characters with Base64?

Yes, any UTF-8 encoded characters can be converted to Base64, and the original text is accurately restored when decoded.

Is my data collected?

No, all encoding and decoding happens in your browser. No data is sent to any server.

Why does Base64 make data larger?

Base64 uses 4 characters to represent every 3 bytes of data, resulting in approximately 33% size increase.

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

URL-safe Base64 replaces + with - and / with _ to avoid conflicts with URL special characters.

Can I encode files with this tool?

This tool encodes text input. For file encoding, copy the file content as text first.

What is padding in Base64?

Padding (= characters at the end) ensures the output length is a multiple of 4. Some systems require it while others accept Base64 without padding.

Related Tools