It's not encryption. It's safe transport.
You have an image, a PDF, or a UTF-8 string. You need to send it through JSON, store it in a cookie, or embed it in a URL. But binary data breaks text-based protocols.
Base64 is the bridge. It translates complex binary data into a safe, printable alphabet of 64 characters (A-Z, a-z, 0-9, +, /). Paste your text or file above. We convert it instantly — handling UTF-8 characters correctly where other tools fail.
Computers store data in bytes (8 bits). Base64 groups consecutive bits into chunks of 6 bits.
Since 2⁶ = 64, each 6-bit chunk maps perfectly to one of the 64 characters in the Base64 alphabet.
This simple shift turns 3 bytes of binary data into 4 characters of text. This is why Base64 encoded files are roughly 33% larger than the original.
ASCII: M (77) a (97) n (110)
Bits: 01001101 01100001 01101110
Regroup 24 bits into 4 x 6 bits:
010011 010110 000101 101110
Index: 19, 22, 5, 46
Base64: T W F u
Standard window.btoa() fails on emojis or non-Latin characters (like '🚀' or '你好'). Our tool handles this by escaping the string first, ensuring multi-byte characters encode correctly.
Base64 strings are padded with '=' signs to ensure the length is a multiple of 4. Removing them breaks standard decoders. Always keep the padding unless you're using a specific 'unpadded' library.
Standard Base64 uses '+' and '/'. These are special characters in URLs. For URLs, use 'Base64Url' encoding (replace '+' with '-' and '/' with '_').
Base64 increases file size by ~33%. Never store large files (videos, huge images) as Base64 in your database. It wastes storage and slows down network requests.
NO. This is a dangerous misconception. Base64 is encoding, not encryption. It hides nothing. Anyone can decode it instantly without a key. Never use Base64 to 'secure' passwords or secrets.
The '=' is padding. Base64 encodes 3 bytes into 4 characters. If the input data length isn't divisible by 3, '=' characters are added to the end to make the output string length a multiple of 4.
Yes. This is commonly used in web development ('Data URIs') to embed small icons directly into CSS or HTML, saving a network request. Our tool supports file upload for this exact purpose.
Standard Base64 uses '+' and '/', which have special meanings in URLs. URL-Safe Base64 replaces '+' with '-' and '/' with '_', and often removes the padding '='.
Our tool runs in your browser, so it's limited by your available RAM. Generally, strings up to 10-50MB work fine, but gigabyte-sized files may crash the tab.