Formatting
The encoder turns bytes into ASCII. The output starts as standard Base64, with plus, slash and padding. “Odd socks in the dryer.” becomes T2RkIHNvY2tzIGluIHRoZSBkcnllci4= including the equals sign that pads the final group. Switch to a data URI when the result must go in an img or a stylesheet. The URI adds a data: prefix and, for typed text, a text type. Switch to Base64URL when the string must sit in a query or a token: plus and slash become minus and underscore, and the padding equals signs are removed.
A file is encoded from its bytes, not from its name. An image encoded as raw Base64 will not display until you choose the data URI or hand the payload to the decoder as a file. The image page defaults to that URI because pictures are its whole job. This page also takes a sentence with no file at all.
Base64 is not encryption. Anyone can decode the dryer sentence. Do not paste a password and call it hidden. The string is also longer than the source, by about a third, which matters when you encode a whole document into a JSON field.
The text “Odd socks in the dryer.” Output set to Base64.
T2RkIHNvY2tzIGluIHRoZSBkcnllci4= The equals sign is padding. Base64URL of the same sentence would swap any plus or slash and drop that padding. A data URI would add a data: prefix in front of a similar payload.
Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.
T2RkIHNvY2tzIGluIHRoZSBkcnllci4=
Plus becomes minus, slash becomes underscore, and the trailing padding is removed.
When the string must be an img src or a CSS url. Raw Base64 will not render there.
No. It is a reversible encoding. Anyone with the string can decode it.
It starts from a picture and defaults to a data URI. This page also encodes plain text and can write Base64URL.