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:
SGVsbG8gV29ybGQhBase64 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
- Enter the text you want to encode in the input area
- Click the "Encode" button
- The Base64-encoded result will appear in the output area
Decoding
- Enter the Base64 string in the input area
- Click the "Decode" button
- 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)