Base64 Encoder / Decoder

How to use 3 steps
  1. Paste your text or Base64 string.
  2. Press Encode to Base64 or Decode to Text.
  3. Copy the result.

Read the full guide

Base64 Output

Loading the tool… 0 of 3 parts

Getting the tool ready. On a slow connection this can take a few seconds.

How this tool works

Base64 represents binary data using sixty-four printable characters, so that something which is not text can travel through a channel that only carries text — an email body, a JSON field, a data URL in a stylesheet. It is an encoding, not encryption: the transformation is public, reversible by anyone, and offers no protection whatsoever.

Text is converted to UTF-8 bytes before encoding and back again after decoding, which is what allows accented characters, other scripts and emoji to survive the round trip rather than coming back mangled. Three bytes of input become four characters of output, so anything encoded this way grows by roughly a third.

What it is for, and what it is not

  • It is not a security measure: encoding hides nothing. Anyone can decode a base64 string in seconds, and a password or key stored this way is stored in plain sight.
  • Output is about a third larger than the input: which matters for data URLs. Inlining a large image as base64 makes the stylesheet or document bigger than the file it replaced.
  • The URL-safe variant is a different alphabet: tokens and URL parameters often use dash and underscore where standard base64 uses plus and slash. Those will not decode here without being converted back first.
  • Whitespace and line breaks usually survive: many systems wrap long base64 at a fixed width. Pasted line breaks are generally tolerated by the decoder, but a truncated string is not.

Full guide

2 min read

Why base64 output is always about a third larger than the input

Three bytes become four characters every time, a fixed cost of the format rather than something content-dependent. Why it offers no protection whatsoever despite looking unreadable, and why a token using dash and underscore needs converting before it will decode here.

Read the guide

Frequently Asked Questions

Specific to the Base64 Encoder / Decoder. Broader questions about this category are answered on the category page.

No. It is a public, reversible encoding with no key and no protection. Anything encoded this way can be read by anyone.
Every three bytes become four characters, so the output is about a third larger. That is inherent to the format.
Yes. Text is converted to UTF-8 bytes before encoding and back afterwards, so the round trip is faithful.
It is probably the URL-safe variant, which uses dash and underscore instead of plus and slash. Convert those back before decoding.
Not here — this works on text. Encoding a binary file is the same operation but needs the file's bytes rather than a text field.

Subscribe to receive notifications about new tools, features, and productivity tips.