Base64 Encode & Decode Online
Encode and decode Base64 strings instantly. Free online Base64 encoder/decoder with full UTF-8 Unicode support. Runs 100% in your browser — no data sent to any server.
Base64 Encoding in Code
Most languages include Base64 support in their standard library. Here are common examples:
JavaScript (Browser & Node.js)
// Encode
const encoded = btoa('Hello, World!');
// "SGVsbG8sIFdvcmxkIQ=="
// Decode
const decoded = atob(encoded);
// "Hello, World!"
// Handle Unicode (UTF-8)
const utf8Encode = btoa(unescape(encodeURIComponent('Caf\u00e9')));
const utf8Decode = decodeURIComponent(escape(atob(utf8Encode)));
Python
import base64
# Encode
encoded = base64.b64encode(b'Hello, World!').decode()
# 'SGVsbG8sIFdvcmxkIQ=='
# Decode
decoded = base64.b64decode(encoded).decode()
# 'Hello, World!'
Bash
# Encode
echo -n 'Hello, World!' | base64
# SGVsbG8sIFdvcmxkIQ==
# Decode
echo 'SGVsbG8sIFdvcmxkIQ==' | base64 --decode
# Hello, World!
Frequently Asked Questions
What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that represents binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /). It is commonly used to embed binary data in text-based formats like JSON, XML, HTML, and email (MIME).
How do I encode text to Base64?
Paste your text into the input field and click Encode. This tool uses the browser's native btoa() function with TextEncoder for full UTF-8 Unicode support. The Base64-encoded output appears instantly in the result field.
Can Base64 handle Unicode characters?
Yes. This tool uses TextEncoder to convert Unicode text to UTF-8 bytes before Base64 encoding, ensuring proper handling of non-ASCII characters like emojis, Chinese characters, and accented letters.
Is Base64 encryption?
No. Base64 is an encoding scheme, not encryption. Anyone can decode a Base64 string back to the original data. It provides no security or confidentiality. Use actual encryption (AES, RSA) if you need to protect data.
Is this tool free?
Yes. All KappaKit tools are free, run in your browser, and require no signup or account.