What is Base64?
Base64 writes any data using just 64 characters: A–Z, a–z, 0–9, + and /. It lets you carry images and binary data through places that only accept text, such as email, JSON, URLs and HTML. Every 3 bytes become 4 characters, so the result is about 33% larger.
Base64 is not encryption. Anyone can decode it instantly, so never use it to hide passwords or personal data.
Unicode and emoji
The browser's built-in btoa() throws an error on characters outside Latin-1, such as Chinese, Korean or emoji. This tool first turns your text into UTF-8 bytes, the web standard, and then encodes them, so “héllo 👋” round-trips perfectly.
URL-safe Base64
The + and / characters mean something special in URLs, so the URL-safe variant swaps them for - and _ and drops the trailing = padding. JSON Web Tokens (JWT) use this form. When decoding, both variants are accepted automatically.
FAQ
What is a data URI?
It's Base64 with the file type in front, like data:image/png;base64,.... Put it in an img src or a CSS url() and the image shows without a separate file. Great for small icons; large images make your page heavy.
Why is my decoded result shown as hex?
The original data isn't text but binary, such as an image or a zip file. A PNG starts with 89 50 4e 47 and a JPEG with ff d8 ff.
Is my text or file uploaded?
No. Everything is converted in your browser and nothing is sent to a server.