Encode text strings to Base64 or decode Base64 back to text. Perfect for API authentication, data transmission, and encoding special characters.
Base64 is a method of encoding binary data (like images or files) into ASCII text format using 64 printable characters. This encoding allows you to embed binary data directly in text-based formats like HTML, CSS, JSON, or XML.
The encoded string is approximately 33% larger than the original binary data due to the encoding overhead, but it ensures data integrity when transmitted through text-only channels.
Base64 is an encoding scheme that converts binary data into ASCII text format. It's commonly used to transmit data over channels that only support text, such as email or HTTP headers.
// Encode username:password
const credentials = btoa("username:password");
// Result: dXNlcm5hbWU6cGFzc3dvcmQ=
// Use in HTTP header
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=const data = JSON.stringify({ user: "john", role: "admin" });
const encoded = btoa(data);
// Send encoded data safelyconst message = "Hello, World!";
const encoded = btoa(message);
// Result: SGVsbG8sIFdvcmxkIQ==Characters used: A-Z, a-z, 0-9, +, /
Padding: = (equals sign)
Total characters: 64
Converts plain text into Base64 format. Use this when you need to transmit text data safely.
Example: "Hello" → "SGVsbG8="
Converts Base64 back to readable text. Use this to read encoded data.
Example: "SGVsbG8=" → "Hello"
No, Base64 is not encryption. It's simply encoding. Anyone can decode Base64 text. Use proper encryption (like AES) for security.
Base64 uses 6 bits per character instead of 8 bits, resulting in approximately 33% larger output compared to the original binary data.
Yes! Our tool supports full UTF-8 encoding, so you can encode any Unicode characters including emojis, Chinese characters, etc.