64

Base64 Encoder Decoder

Encode plain text to Base64 or decode Base64 back to readable text instantly.

Switch between encode and decode mode to convert content instantly. Everything happens locally, so you can test examples quickly and keep sensitive text in your browser.

Output

Recent history

Saved conversions will appear here.

About this tool

Last updated:

Encode and decode Base64 text in your browser

This Base64 encoder and decoder converts plain text to Base64 and turns Base64 back into readable text. The output updates as you type, so you can check an API payload, a config value or an encoded header in seconds. It handles Unicode text correctly, including accents, symbols, emoji and non-Latin scripts, because it works through UTF-8 bytes.

How to use it

  1. Choose Encode to Base64 or Decode Base64.
  2. Type or paste your text into the input box on the left.
  3. Read the result in the Output box. It changes instantly with every edit.
  4. Click Copy output to copy it, or Save to history to keep it for later.
  5. Click any item in Recent history to load that input and mode again.

How it works

Base64 represents bytes using 64 safe ASCII characters: A–Z, a–z, 0–9, + and /, with = as padding. Every 3 bytes of input become 4 characters, so encoded text is about a third longer than the original.

When encoding, the tool first turns your text into UTF-8 bytes with the browser's TextEncoder, then encodes those bytes with btoa. When decoding, it reverses the steps: atob turns Base64 into bytes and TextDecoder reads them as UTF-8. This avoids the common error you get when passing non-English text straight to btoa.

All conversion happens in JavaScript on the page. Your text is not uploaded. Saved items stay in your browser's local storage, and the history keeps the 10 most recent entries.

Example

TextBase64
HelloSGVsbG8=
caféY2Fmw6k=

Tips

  • If you see "cannot be decoded as valid Base64 text", the input has characters outside the standard Base64 alphabet or is cut off.
  • URL-safe Base64 uses - and _. Replace them with + and / before decoding here.
  • This tool works with text. To turn a file into Base64, use File to Base64 Encoder. To save a Base64 string as a file, use Base64 to File Decoder.

Frequently asked questions

Is Base64 a form of encryption?

No. Base64 is an encoding, not encryption. Anyone can decode it without a key, so never use it to hide passwords or secrets.

Why does my decoded text look garbled?

The tool reads decoded bytes as UTF-8 text. If the Base64 holds an image, PDF or other binary data, the result will not be readable. Use the Base64 to File Decoder for that.

Does it support emoji and other languages?

Yes. Text is converted through UTF-8, so emoji, Arabic, Chinese, Cyrillic and accented letters encode and decode correctly.

More to explore

Related Developer Tools

Browse all tools from the same category.

Showing 1-2 of 49