Skip to content
OddsockLocal
Local
Source text

Formatting

2 wordsRuns in this browser. Nothing is uploaded.

How to use

  1. Type the text, or add one file.
  2. Leave the output on Base64 for a normal payload.
  3. Choose Base64URL for a query or a token, or a data URI for HTML.
  4. Copy the result. Decode it on the decoder page if you want to prove the round trip.

What is Base64 encoder?

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.

Read more

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.

Use cases

  • A developer encoding “Odd socks in the dryer.” and checking the padding equals sign.
  • An engineer switching to Base64URL so the same sentence can sit in a query string.
  • A student choosing the data URI for a tiny file and raw Base64 for a token.
  • A teacher showing that the result is not a password hash and decodes straight back.
  • A support tech encoding a small file to compare with the image page’s URI.

A sentence, with padding

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.

Why use Oddsock

Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.

Related tools

Using this tool

T2RkIHNvY2tzIGluIHRoZSBkcnllci4=