Base64 Encoder & Decoder — Text & File, Instant, No Upload

Encode plain text to Base64 or decode Base64 strings back to readable text in your browser. File mode converts images and files to data:URI format for instant developer copy. 100% client-side.

Frequently Asked Questions

What is Base64 encoding used for?

Base64 encodes binary data as ASCII text, making it safe to transmit in contexts that only support text — such as JSON APIs, email attachments (MIME), HTML data URIs, and HTTP Basic Authentication headers. It increases data size by about 33% but guarantees safe transport across any text-based channel.

Can I encode images to Base64 for use in CSS or HTML?

Yes. Switch to File mode, drop your image, and the tool outputs a complete data:image/...;base64,... URI. Copy it directly into a CSS background-image property or an HTML <img> src attribute to embed the image inline without a separate HTTP request.

Is UTF-8 text encoding supported?

Yes. The encoder uses encodeURIComponent and unescape to safely handle the full Unicode range including emoji, Cyrillic, CJK characters, and other multibyte code points. Invalid Base64 strings are caught with a clear error message during decoding.

Related Tools