On this page
Base64 turns bytes into a string made of letters, digits, +, /, and sometimes =. Anyone can reverse it. The Base64 page does that conversion in the browser. It does not encrypt, and it does not store the text on a server.
Input
Output
Input
Output
The string this code produced
encodeText("Casablanca") with URL-safe off, padding kept, and no line wrap returned:
Q2FzYWJsYW5jYQ==
base64ToBytes then bytesToText on that output returned Casablanca. The round trip used UTF-8 bytes from TextEncoder, then btoa on those bytes. The two = characters are padding so the length is a multiple of 4. They are not a checksum.
A second call encoded a+b/c with URL-safe turned on and padding kept. The result was YStiL2M=. URL-safe mode replaces + with - and / with _ in the output alphabet. In this particular output those two characters did not appear, so the string looks like ordinary Base64. That is normal. URL-safe only changes the alphabet when the raw encoding contains + or /.
??? is a better demonstration. With URL-safe off and padding kept, encodeText returned Pz8/. The slash is a real Base64 character. The same bytes with URL-safe on and padding removed returned Pz8_. Only that one character changed. hello returned aGVsbG8= with padding, and aGVsbG8 when padding was removed. subjects returned c3ViamVjdHM= and, with padding removed, c3ViamVjdHM. Neither of those outputs contains + or /, so URL-safe mode does not change them except for the padding switch. Decoding has to put the padding logic back. If a strict decoder rejects the unpadded form, turn padding back on. A decoder on this page strips whitespace first, then accepts the alphabet it detects. Do not add a space in the middle of Pz8_ and expect a different value. Spaces are removed, not treated as data.
The page also has a file path, a 5 MB ceiling (MAX_BASE64_FILE_BYTES), and optional wrapping at 64 or 76 columns. Those options change whitespace or the file you picked. They do not change the Casablanca bytes.
What people mix up
Encoding is not encryption. If a password, a token, or a private key is only Base64, it is still readable. Decode it. Do not put a secret in a URL, a screenshot, or a ticket because it "looks encoded."
Base64 is also not compression. The encoded form is longer than the bytes. Casablanca is 10 UTF-8 bytes and the encoded form is 16 characters. That growth is the point of the alphabet, not a bug in the tool.
UTF-8 matters. The word above is ASCII, so each character is one byte. An Arabic letter is more than one UTF-8 byte, and the encoded length grows with the bytes, not with the number of letters you count on screen.
Padding is optional only when you turn that option on. Decoders often accept a missing =, and some do not. If a consumer is strict, leave the padding.
Line breaks are not part of the data. The decoder on this page strips whitespace before it decides the alphabet. A MIME body wrapped at 76 columns can still decode. A character outside the alphabet cannot.
Mistakes
Pasting a data URL (data:image/png;base64,....) into a decoder that expects the payload alone will fail or produce garbage, because the prefix is not Base64. Cut at the comma first.
Confusing Base64 with URL encoding is the other one. Space becomes + or %20 in a query string. In Base64, + is an alphabet character. The URL encoder is the page for query strings. This page is the page for bytes.
A JWT is three Base64url segments separated by dots. Decoding one segment shows JSON. It does not verify the signature. Use the JWT tool when you care about the signature, and this page when you only want the bytes.
Limits
The file limit is 5 MB. Larger files are refused. The tool does not stream them.
Image detection looks at magic bytes for PNG, JPEG, GIF, and WebP after a decode. A file that is not one of those is treated as text or as a hex dump, depending on the path you used. A decode that is valid Base64 can still be the wrong file.
URL-safe detection on input treats a string as URL-safe when it contains - or _ and does not contain + or /. A short payload that happens to avoid all four characters is ambiguous. If a decode looks wrong, try the other alphabet.
Nothing here checks that the text is safe to open. Decoding a file you do not trust is still opening a file.
When the next step is JSON
If the decoded text starts with { or [, it might be JSON and it might not. The JSON formatter runs JSON.parse and will reject trailing commas and comments. Decode first, then format. Encoding JSON does not validate it.

