Skip to main content

Base64 Encoder/Decoder

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

📝 Input Text

✨ Result

💡 Examples

Original:
Hello World!
Base64:
SGVsbG8gV29ybGQh

Base64 encoding converts binary data into ASCII text format. Commonly used for embedding images in HTML/CSS, API authentication, and data transmission.

What is Base64?​

Base64 is a method to encode binary data into ASCII strings. It's primarily used when transmitting binary data through text-based formats like email, URLs, and JSON.

Key Features​

  • Encoding: Convert plain text to Base64 format
  • Decoding: Convert Base64 strings back to original text
  • UTF-8 Support: Full support for Korean, Japanese, Chinese, and all other languages
  • Swap Function: Quickly exchange input and output
  • Copy Function: Copy results with a single 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 be displayed in the output area

Decoding​

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

Base64 Use Cases​

1. Image Embedding​

You can Base64-encode small images and include 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 Transfer​

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: Represent complex binary data as simple strings

Disadvantages​

  • Size Increase: About 33% larger than original data
  • Not Encryption: Base64 is encoding, not encryption. Do not use 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 Processing​

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 the following 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?​

Generally 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.

🔗 Try These Next​

💬 Was this tool helpful?​

Feel free to send us your feedback or suggestions anytime!

Browser Compatibility​

This tool works properly in the following browsers:

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

Privacy​

This tool operates entirely on the client side. Your input data is never sent to a server and is processed only in your browser.