Base64 Encoder & Decoder

UTF-8 safe, supports standard and URL-safe variants. Live conversion as you type — no buttons required.

Input (text)

0 bytes

Output (base64)

What is Base64 used for?

Base64 is ubiquitous wherever binary data must travel through a text-only channel. Common uses include embedding images inside CSS via data:image/png;base64,… URIs, transmitting file uploads inside JSON APIs, encoding HTTP Basic Auth credentials, and packing cryptographic keys into config files. Because Base64 uses only 64 printable ASCII characters (A–Z a–z 0–9 + /) plus = for padding, the resulting string is safe to paste into emails, URLs (with the URL-safe variant), and source code.

Standard vs URL-safe

Standard Base64 (RFC 4648 section 4) uses + and / as characters 62 and 63, with = padding to make the length a multiple of 4. These characters have special meaning in URLs and filenames, so RFC 4648 section 5 defines a URL-safe variant that substitutes - for + and _ for /, and usually drops the trailing = padding. Many JWT libraries, OAuth tokens, and S3 signed URLs use this variant.

Why UTF-8 matters

The legacy browser functions btoa() and atob() operate on Latin-1 byte strings and choke on any character above code point 255. This tool bridges that gap with TextEncoder / TextDecoder, so Unicode text such as 안녕하세요, مرحبا, or emoji 🚀 encode and decode losslessly as UTF-8 bytes.

Privacy

All encoding and decoding happens in your browser tab. The tool makes zero network calls and does not persist your data anywhere.