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.

How Does Base64 Encoding Work?

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.

Common Use Cases

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. This tool supports full UTF-8 text, so you can encode and decode multi-byte characters including emojis and international scripts.

Build with Phoenix Code

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

Try Phoenix Code