Base64 Encode / Decode

Encodes text to Base64 using UTF-8, or decodes standard or URL-safe Base64 back to text.

Loading…

How to use

  1. Choose Encode or Decode.
  2. When encoding, tick URL-safe if the result will be used in a URL or file name. The option is shown only in Encode mode; decoding accepts both forms.
  3. Type or paste into the box. The result updates as you type.
  4. Press Copy to copy the result, or Swap to move the result into the input and switch direction, for example to check that it decodes back to the original.

Frequently asked questions

Is my text sent to a server?
No. Encoding and decoding happen in your browser.
What is URL-safe Base64?
It replaces + and / with - and _ and drops the trailing = padding, so the value can be used in URLs and file names without escaping. Decode reads both standard and URL-safe input, so no option is needed there.
Why does decoding say the input is not valid?
Either the input contains characters outside the Base64 alphabet, or the decoded bytes are not valid UTF-8 text, as with images or other binary data. Spaces and line breaks are ignored, and missing = padding is added automatically.
Does it handle non-English text and emoji?
Yes. Text is converted to UTF-8 bytes before encoding, so accented letters, CJK characters and emoji round-trip correctly. Results match other tools that use UTF-8, but not tools that encode text as UTF-16 or a legacy code page.
Is Base64 a form of encryption?
No. Base64 only represents bytes as text, and anyone can decode it. The encoded result is about 4/3 the size of the original bytes.