S
StringTools

Base64 Encode / Decode

Encode text to Base64 or decode Base64 strings back to plaintext. Supports full UTF-8 characters.

Input0 chars
Output
Result will appear here...

What is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that converts binary data into a set of 64 printable ASCII characters. It is commonly used to embed images in HTML and CSS, transmit data in JSON payloads, encode credentials in HTTP Basic Auth headers, and store binary data in XML or text-based formats.

Our Base64 tool supports full UTF-8 character encoding, so you can safely encode and decode international text, emojis, and special characters without data loss. All processing happens entirely in your browser — your data never leaves your device.

How Base64 Encoding Works

Base64 encoding takes three bytes of binary data (24 bits) and splits them into four groups of 6 bits each. Each 6-bit group maps to one of 64 ASCII characters: A-Z, a-z, 0-9, +, and /. If the input length is not a multiple of three, padding characters (=) are added.

This makes Base64-encoded data approximately 33% larger than the original, but it guarantees the output contains only safe, printable characters that can be transmitted over any text-based protocol without corruption.

Common Use Cases for Base64

Embedding Images in HTML/CSS — Convert small images or icons to Base64 data URIs to reduce HTTP requests and improve page load performance.

API Authentication — HTTP Basic Authentication requires encoding "username:password" as Base64. Use this tool to quickly encode or decode auth headers.

Email Attachments — MIME encoding uses Base64 to embed binary attachments within email messages that are transmitted as text.

Storing Binary in JSON — JSON does not support binary data natively. Base64 encoding allows you to include images, files, or encrypted data as strings within JSON payloads.

JWT Tokens — JSON Web Tokens use Base64URL encoding for the header, payload, and signature components. Decode them to inspect claims and verify token contents.

Frequently Asked Questions

What is Base64 encoding?

Base64 is a binary-to-text encoding scheme that converts binary data into a set of 64 printable ASCII characters. It is used to safely transmit binary data over text-based protocols like email, JSON, and URLs.

Does this tool support UTF-8 characters?

Yes. Our Base64 tool handles full UTF-8 encoding, including international characters, emojis, and special symbols without any data loss.

Is Base64 encoding the same as encryption?

No. Base64 is an encoding scheme, not encryption. Anyone can decode a Base64 string without a key. It is designed for data transport, not security.