Home / Developer Tools / Base64 Encoder & Decoder

Base64 Encoder & Decoder

Encode text to Base64 or decode Base64 to text instantly. Supports UTF-8, file encoding, and URL-safe Base64. Free online tool.

Advertisement

What Is Base64 Encoding?

Base64 is a method of encoding binary data into ASCII text characters. It converts every 3 bytes of data into 4 ASCII characters, making it safe to transmit binary data through systems that only handle text — like email, JSON, HTML, and URLs.

When to Use Base64

Common uses include embedding images in HTML or CSS (data URIs), encoding email attachments (MIME), transmitting binary data in JSON APIs, and storing small files in databases as text. Base64 increases the data size by roughly 33%, so it's best used for small data.

URL-Safe Base64

Standard Base64 uses + and / characters, which have special meaning in URLs. URL-safe Base64 replaces + with - and / with _, making it safe for use in URLs and filenames without additional encoding.