Base64
Type in either box to encode or decode live, with proper UTF-8 and a URL-safe option. Drop a file to get Base64 or a data URI, or turn Base64 back into a file.
How it works
Base64 turns any bytes into 64 safe characters (A–Z a–z 0–9 + /), so binary data can travel through text-only places like JSON, email and URLs. Every 3 bytes become 4 characters, which is why encoded data is about 33% larger.
Text is converted to UTF-8 bytes before encoding, so accented letters, emoji and non-Latin scripts round-trip correctly — unlike a bare btoa(), which throws on them. URL-safe Base64 (RFC 4648 §5) swaps + and / for - and _ and usually drops the = padding; it is what JWTs and many APIs use. The decoder accepts either alphabet, with or without padding and line breaks.
Questions
Is Base64 encryption?
No. Base64 is an encoding, not encryption — anyone can decode it instantly. Never use it to hide passwords or secrets.
Why does my decoded text look like gibberish?
The Base64 probably holds binary data (an image, a PDF, compressed bytes) rather than text. When the bytes are not valid UTF-8 the tool says so, guesses the file type and offers a download instead.
What is a data URI?
A data URI embeds a file directly in a URL: data:image/png;base64,iVBOR…. You can use it in an <img src> or a CSS background to avoid a separate request. It works best for small files like icons; large images are better served as normal files.
Are my files uploaded?
No. Files are read with the browser’s FileReader and encoded on your device. Nothing leaves your computer.
What is the difference between Base64 and Base64URL?
Base64URL replaces + with - and / with _ so the result can sit in a URL or filename without escaping, and it normally omits the trailing =. The decoded bytes are identical.