Encode text or files to Base64 and decode Base64 back to text, with full Unicode support and a URL-safe option, right in your browser.
Your text and files never leave your device. Encoding and decoding happen in this browser tab.
Base64 is a way of writing any binary data, such as an image, a PDF or a piece of text in any language, using only 64 safe characters: the capital letters A to Z, the small letters a to z, the digits 0 to 9, and the symbols + and /. The equals sign = is added at the end as padding. Because those characters survive email systems, JSON, XML, URLs and copy and paste without being changed, Base64 is the standard way to carry bytes through channels that were designed for plain text. It is defined in RFC 4648.
data:image/png;base64,... saves a network request.username:password in Base64.The encoder takes your data three bytes at a time. Three bytes are 24 bits, which it splits into four groups of 6 bits. Each 6 bit group is a number from 0 to 63, and that number picks one character from the 64 character alphabet. So every 3 bytes become 4 characters, and the encoded text is always about 33 percent larger than the original. When the data does not divide evenly into groups of three, the last group is padded with one or two = signs.
Text has to become bytes first. This tool converts your text to UTF-8 with the browser's TextEncoder, so Hindi, emoji, accented letters and Chinese all round-trip exactly. The common shortcut of calling btoa() directly on a string fails on any character outside Latin-1, and that is the usual reason other converters show an error on a rupee sign or an emoji.
The word "Man" is the bytes 77, 97 and 110, or 01001101 01100001 01101110 in binary. Regrouped into 6 bits that is 010011 010110 000101 101110, the numbers 19, 22, 5 and 46, which are the characters T, W, F and u. So "Man" encodes to TWFu. The single letter "é" is two bytes in UTF-8, so it becomes w6k=, with one padding sign.
The characters + and / have special meanings in URLs and file names. The URL-safe variant from the same RFC swaps them for - and _ and usually drops the padding. JSON Web Tokens use it. The decoder here accepts both alphabets, with or without padding, and ignores spaces and line breaks, so you can paste wrapped output from an email.
If decoding fails, the tool tells you why: a character that is not part of Base64 and its position, a length that cannot be complete, or padding in the wrong place. If the input is valid but turns out to be an image or another binary file rather than text, it says so, and Download saves the decoded bytes as a file. Files up to 10 MB can be encoded.
Anyone can decode Base64 instantly, so never use it to hide a password or personal data. Everything on this page runs in your browser, and nothing you paste or open is sent to Ur Next Door.