Base64 Encoder / Decoder converts text to and from Base64 encoding using the browser's built-in btoa/atob functions. It also handles file encoding — drop any file to get its Base64 data URI, which you can copy or download as a .txt file.
Drop or select any file to get its base64 data URI.
Yes. The file encoding section reads any file as a binary buffer and produces a full data URI including the MIME type prefix, suitable for use directly in HTML src attributes or CSS url().
Base64 is used to embed binary data (images, fonts, files) in text-based formats like HTML, CSS, JSON, and email, since those formats can't safely contain raw binary bytes. It increases data size by roughly 33%.
The = characters are padding, added when the input length isn't a multiple of 3 bytes. They're a normal part of standard Base64 and required for correct decoding.
The tool shows an error message indicating the input isn't valid Base64, rather than producing garbled output.
The current version uses standard Base64 (with + and / characters). URL-safe Base64 (using - and _) is not yet a separate mode.
Yes. Drop an image file into the file encoding section to get its full data URI, which can be pasted directly into an <img src> or CSS background-image.
There's no hard limit, but very large files produce very large Base64 strings, which can be slow to display and copy in the browser.