Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to text. Supports UTF-8, JSON, HTML, and binary. 100% client-side.
How to Use
Paste
Enter text to encode or a Base64 string to decode.
Convert
Results appear instantly as you type. Toggle between Encode and Decode modes.
Copy
Copy the result to clipboard. Use Swap to move output back to input.
What is Base64?
Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters: A-Z, a-z, 0-9, +, and /, with = used for padding. It was designed to transmit binary data through text-only systems like email (MIME), JSON, XML, and URLs.
Every 3 bytes of input produce 4 Base64 characters, resulting in a 33% size increase. This trade-off is the cost of representing binary as safe ASCII text. Base64 is not encryption — it provides no security. Anyone can decode it.
Common Use Cases
- Email attachments — MIME uses Base64 to encode binary files inside text-based email messages.
- Data URIs — embed images directly in HTML/CSS as
data:image/png;base64,...without separate HTTP requests. - API authentication — HTTP Basic Auth sends
username:passwordas Base64 in the Authorization header. - JSON payloads — transmit binary data (images, PDFs, certificates) inside JSON API responses.
- JWT tokens — JSON Web Tokens use Base64url encoding for the header and payload sections.