Base64 Encode and Decode
Encode text to Base64 or decode Base64 back to plain text instantly. Supports Unicode, emoji, and special characters. 100% client-side.
Last Updated: August 2026
100% Client-Side — Your data never leaves your device
Base64 Encode/Decode in Code
How to encode and decode Base64 text in your favorite language.
JavaScript
// Encode text to Base64
const encoded = btoa("Hello, World!");
console.log(encoded); // "SGVsbG8sIFdvcmxkIQ=="
// Decode Base64 back to text
const decoded = atob(encoded);
console.log(decoded); // "Hello, World!"
// Handling Unicode (btoa/atob only work with Latin-1)
function utf8ToBase64(str: string): string {
return btoa(unescape(encodeURIComponent(str)));
}
function base64ToUtf8(b64: string): string {
return decodeURIComponent(escape(atob(b64)));
}Frequently Asked Questions
Search below or browse through our most commonly asked questions.
Type or paste your text into the input area and select the 'Encode' tab. The tool instantly converts your text to a Base64 string.
Yes! The tool uses UTF-8 encoding which fully supports Unicode characters, including emoji and non-Latin scripts.