Skip to content
OddsockLocal
Local
Source text

Formatting

2 wordsRuns in this browser. Nothing is uploaded.

How to use

  1. Paste Base64, or a full data URI.
  2. Leave the output on text for a message.
  3. Switch to file if the payload is an image or anything that is not text.
  4. If you see an invalid-character error, the paste was not Base64.

What is Base64 decoder?

Decode takes Base64 and returns text, or a file if you ask for one. Spaces and line breaks in the payload are ignored. A data URI is accepted: the prefix up to the comma is peeled off and the rest is decoded. Base64URL, with minus and underscore instead of plus and slash, is accepted too. The output starts as text, which is right for a sentence and wrong for a PNG. A picture decoded as text looks like garbage. Switch the output to a file and you get decoded.bin, or the type the data URI named.

Read more

The encoder’s sample sentence is the clean round trip. “Odd socks in the dryer.” encodes as T2RkIHNvY2tzIGluIHRoZSBkcnllci4= and decodes back to that sentence. Ordinary English pasted into this page fails, because those letters are not a valid payload. That error means the input was not Base64. It does not mean the decoder is broken.

Use text for messages, tokens and small snippets. Use the file output for an image or a PDF someone pasted as Base64. The general encoder is where you go the other direction, including Base64URL with the padding removed.

Use cases

  • A developer decoding T2RkIHNvY2tzIGluIHRoZSBkcnllci4= back to the sentence.
  • A student pasting a paragraph of English and reading the invalid-character error.
  • An engineer peeling a data URI of a PNG back into a file instead of text.
  • A support tech decoding a Base64URL token that used minus and underscore.
  • A teacher showing that line breaks inside a payload do not change the result.

The dryer sentence, decoded

T2RkIHNvY2tzIGluIHRoZSBkcnllci4=

Odd socks in the dryer. A PNG’s Base64, decoded with output set to text, would be unreadable bytes. The same PNG as a data URI, with output set to a file, comes back as a file you can open.

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= is “Odd socks in the dryer.”