Convert text and files to Base64 and back, including emoji and accented letters.
- and _ instead of + and /.Base64 (RFC 4648) writes binary data using only 64 safe characters: A–Z, a–z, 0–9, + and /. Every 3 bytes become 4 characters, so the output is about 33% larger than the input. When the input length isn't a multiple of 3, one or two = signs pad the end. The URL-safe variant swaps + and / for - and _ and often drops the padding.
Text is first turned into bytes with UTF-8, the encoding the web uses, so emoji and accented letters survive the round trip. For example, héllo 👋 is 11 bytes in UTF-8 and encodes to aMOpbGxvIPCfkYs=. Decoding reverses the steps and checks that the bytes are valid UTF-8; if they aren't, the data is probably a binary file, and you can download it instead of viewing it.
The decoder is forgiving about formatting: it ignores spaces and line breaks, accepts both the standard and URL-safe alphabets, and works with or without padding. It still points out real problems, such as a character that doesn't belong in Base64 or a length that can't be right. For images specifically, our Image to Base64 tool shows a preview and ready-made HTML and CSS snippets.
Is Base64 encryption?
No. Base64 is an encoding, not a lock. Anyone can decode it in a second, so never use it to hide passwords or private data. To protect a file, use our File Encryption Tool.
Why does my decoded text look like random symbols?
The Base64 probably holds a binary file (an image, PDF or zip) rather than text. Use Download decoded bytes or the Base64 → File tab to save it, and the tool will try to guess the right file type.
What is a data URL?
A data URL puts a file directly inside a link, like data:image/png;base64,iVBOR…. Browsers can display it without a separate download, which is handy for small icons in HTML or CSS.
When should I use URL-safe Base64?
Use it whenever the encoded text goes into a URL, a cookie or a file name, because +, / and = have special meanings there. JSON Web Tokens, for example, use URL-safe Base64 without padding.
Is there a size limit?
Only your device's memory. Files of tens of megabytes encode fine on a computer. Very large results are offered as a download rather than shown in the box, to keep the page responsive.