This tool converts text or files to Base64 and back. Text is handled as UTF-8, so emoji and non-Latin scripts survive the round trip. You can switch to the URL-safe alphabet used in JWTs and web APIs, and choose whether to keep the = padding.
In file mode you can turn any file up to 25 MB into plain Base64 or a data URI. In decode mode you can paste Base64 or a data URI and read it as text, or download the bytes as a file.
Invalid input is explained, not ignored: you get the offending character and its position, or a note that the length cannot be valid. Everything runs in your browser and nothing is uploaded.
Yes. Text is converted to UTF-8 bytes before encoding and decoded as UTF-8 afterwards. The browser's plain btoa() fails on any character outside Latin-1, which is why many online tools break on non-English text.
Standard Base64 uses + and /, which have special meanings in URLs. The URL-safe form swaps them for - and _ and usually drops the = padding. It is used in JWTs and many web APIs. Decoding accepts both forms, with or without padding.
Choose File, pick the file, then set Output to Data URI. The result starts with data: and the file's type, and you can paste it into an img src, a CSS url() or an href. Files up to 25 MB are supported.
Choose Text, then Decode, and paste the Base64 or a data URI. If the bytes are not text, the page says so and Download file saves them. Common types such as PNG, JPG, GIF, WebP and PDF are recognised and get the right extension.
The message names the problem and its position: a character outside the Base64 alphabet, padding in the wrong place, mixed standard and URL-safe characters, or a length that cannot be valid. Spaces and line breaks are ignored.
No. It is a reversible encoding that makes bytes printable, so anyone can decode it. Do not use it to hide secrets. Nothing you enter here is uploaded or stored.