Skip to Content

Base64 Encoder/Decoder

Free online tool to encode text to Base64 or decode Base64 back to text.

📝 Input Text

✨ Result

💡 Examples

Original:
Hello World!
Base64:
SGVsbG8gV29ybGQh

Base64 encoding converts binary data to text for safe transmission. Perfectly supports UTF-8 characters, allowing encoding/decoding of text in any language.

What is Base64?

Base64 is a method of encoding binary data into ASCII strings. It's commonly used when transmitting binary data through text-based formats such as email, URLs, and JSON.

Key Features

  • Encoding: Convert plain text to Base64 format
  • Decoding: Convert Base64 strings back to original text
  • UTF-8 Support: Perfect support for multilingual characters including Korean, Japanese, and Chinese
  • Swap Function: Quick exchange between input and output
  • Copy Function: Copy results with one click
  • Error Handling: Clear error messages for invalid Base64 input

How to Use

Encoding

  1. Enter the text you want to encode in the input area
  2. Click the "Encode" button
  3. The Base64-encoded result will appear in the output area

Decoding

  1. Enter the Base64 string in the input area
  2. Click the "Decode" button
  3. The decoded original text will appear in the output area

Base64 Use Cases

1. Image Embedding

You can encode small images to Base64 and embed them directly in HTML or CSS.

<img src="data:image/png;base64,iVBORw0KGgoAAAANS..." />

2. API Authentication

Many REST APIs use Base64 encoding for username and password in Basic Authentication.

Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

3. Data Transmission

Used when transmitting binary data in email attachments or JSON responses.

Base64 Characteristics

Advantages

  • Text Safety: Safely transmit binary data by converting to text
  • Compatibility: ASCII characters supported on all systems
  • Simplicity: Express complex binary data as simple strings

Disadvantages

  • Size Increase: Approximately 33% larger than original data
  • Not Encryption: Base64 is encoding, not encryption - should not be used for security purposes

Examples

Example 1: Simple Text

Input: Hello World
Output: SGVsbG8gV29ybGQ=

Example 2: Korean Text

Input: 안녕하세요
Output: 7JWI64WV7ZWY7IS47JqU

Example 3: Special Characters

Input: Hello! @#$%
Output: SGVsbG8hIEAjJCU=

Technical Details

UTF-8 Encoding Handling

This tool uses the following method to properly handle UTF-8 characters:

// Encoding
btoa(unescape(encodeURIComponent(text)))

// Decoding
decodeURIComponent(escape(atob(base64)))

Base64 Character Set

Base64 uses 64 characters:

  • Uppercase: A-Z (26 characters)
  • Lowercase: a-z (26 characters)
  • Numbers: 0-9 (10 characters)
  • Symbols: + and / (2 characters)
  • Padding: = (when needed)

Frequently Asked Questions

Q: Is Base64 encryption?

No. Base64 is simply a method of encoding data, not encryption. Anyone can easily decode it, so it should not be used to protect sensitive information.

Q: Can I encode Korean or special characters?

Yes. This tool fully supports UTF-8, so you can encode/decode all languages and special characters.

Q: How much does the size increase when encoding to Base64?

Typically about 33% larger than the original data. This is because 3 bytes of data are converted to 4 bytes of Base64 characters.

Q: Can I encode files to Base64?

This tool is text-only. To encode files, you must first read the file as text. For small files, you can copy the file contents and paste them into this tool.

Browser Compatibility

This tool works normally in the following browsers:

  • Chrome 4+
  • Firefox 1+
  • Safari 3.1+
  • Edge (all versions)
  • Opera 10.5+

Privacy Protection

This tool operates completely client-side. Your input data is not transmitted to any server and is processed only in your browser.