Base64 Encoder & Decoder

Encode text to Base64 or decode Base64 back to text — with correct UTF-8 handling for Arabic, emoji, and other Unicode text.

How to use this tool

Type or paste text in the top box and press "Encode →" to get its Base64 representation below. Or paste Base64 in the top box and press "← Decode" to get the original text below.

About this tool

Plain btoa() only handles Latin1 text and throws on anything outside that range. This tool converts text to UTF-8 bytes with TextEncoder before encoding, and back with TextDecoder after decoding, so Arabic, emoji, and any other Unicode text round-trips correctly.

100% client-side — nothing you type is uploaded, logged, or stored. Base64 is an encoding, not encryption; it does not protect sensitive data.

Frequently asked questions

Why does plain btoa() fail on some text?

The browser's built-in btoa() function only accepts Latin1 (single-byte) characters and throws an error on anything outside that range, such as Arabic text or emoji. This tool first converts text to UTF-8 bytes with TextEncoder before Base64-encoding, so any Unicode text works correctly.

What is Base64 used for?

Base64 encodes arbitrary binary or text data using only 64 printable ASCII characters, commonly used to embed data in places that only support text — email attachments, data URLs, JSON/XML payloads, and authentication headers.

Is Base64 encryption?

No. Base64 is an encoding, not encryption — it's fully reversible by anyone with no secret key required. Never rely on Base64 alone to protect sensitive data.