Base64 Encoder & Decoder

Encode text to Base64 or decode Base64 strings instantly. Full UTF-8 support.

100% Client-Side Processing — Your Data Never Leaves Your Browser
Text
Base64 Encoded

What is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It is commonly used to embed binary data in text-based formats such as JSON, XML, HTML, and email messages. Each Base64 digit represents exactly 6 bits of data, making it a widely used method to safely transmit data over channels that only support text. This tool encodes text to Base64 and decodes Base64 back to text bidirectionally.

How to Encode Text to Base64

Type or paste your text on the Encode tab and the Base64-encoded output appears instantly. Base64 encoding works by taking every three bytes of input data and converting them into four ASCII characters. The input bytes are split into 6-bit groups, and each group is mapped to a character from a 64-character alphabet (A-Z, a-z, 0-9, +, /). If the input length is not a multiple of three, padding characters (=) are added to the output. This encoder uses TextEncoder to properly handle UTF-8 multi-byte characters, including emojis and international scripts.

How to Decode Base64 to Text

Switch to the Decode tab and paste your Base64 string — the decoded text appears instantly. The decoder validates input format and reports errors clearly if the Base64 is malformed (invalid characters, incorrect padding, etc.). Decoding properly handles UTF-8, so multi-byte characters reconstruct correctly. Whether you need base64 to text, base64 decode for API responses, or to inspect a Base64-encoded JWT payload, this tool handles it all locally in your browser.

Common Use Cases for Base64 Encoding

Base64 encoding is used to embed images in CSS or HTML via data URIs, encode binary attachments in email (MIME), transmit data through URLs and APIs, store binary content in JSON or XML, and encode authentication credentials in HTTP Basic Auth headers. JWT tokens use a URL-safe Base64 variant for their payload. This tool supports full UTF-8 text, so you can encode and decode multi-byte characters including emojis and international scripts.

Frequently Asked Questions

How do I encode text to Base64?

Type or paste your text into the input field on the Encode tab. The Base64-encoded output appears instantly. Copy it with one click. The encoder supports full UTF-8 including multi-byte characters, emojis, and international scripts (Chinese, Arabic, Cyrillic, etc.).

How do I decode Base64 to text?

Switch to the Decode tab, paste your Base64 string, and the decoded text appears instantly. If the input contains invalid Base64 characters or padding, an error message will explain the problem.

Does this tool support UTF-8 and emojis?

Yes. The encoder uses TextEncoder/TextDecoder APIs to properly handle UTF-8 multi-byte characters, including emojis, accented characters, and non-Latin scripts (Chinese, Japanese, Korean, Arabic, Hebrew, Cyrillic, etc.). This avoids the corruption you get with naive btoa()/atob() calls.

Is my data private?

Yes. All encoding and decoding happens entirely in your browser. Nothing is sent to any server. The page works offline once loaded — safe for sensitive data, credentials, or confidential text.

Build with Phoenix Code

A modern code editor with live preview, built for web developers and designers.

Try Phoenix Code