Base64
Encode and decode text, images and files. Stays in your browser.
Base64
—
About
Turn text, images or any file into Base64, or turn Base64 back into what it came from. Text works with emoji and non-English characters, and you can pick the URL-safe alphabet. Drop in an image or file to get a data URI you can paste into HTML or CSS, or paste a Base64 string or data URI to preview the image and download the file.
- What is Base64 used for?
- It writes any data using only letters, digits, + and /, so it can travel through places that only accept text: JSON, email, URLs, HTML and CSS. It is an encoding, not encryption: anyone can decode it.
- Does it handle emoji and non-English text?
- Yes. Text is converted as UTF-8 first, so Chinese, accented letters and emoji encode and decode correctly. Plain btoa() in a browser throws an error on those.
- What is URL-safe Base64?
- The same encoding with - and _ in place of + and /, and no = padding, so the result can go in a URL or a JWT unchanged. Decoding accepts either version.
- What is a data URI?
- A file written into the address itself, like data:image/png;base64,iVBOR... You can use it as an image source in HTML or CSS without a separate file. In File / image mode, Data URI output includes that prefix; Raw Base64 leaves it off.
- Are my files uploaded?
- No. Everything happens in your browser and nothing is sent anywhere. Files are limited to 2 MB, because bigger ones make a Base64 string long enough to slow the page down.