Base64 Encoder & Decoder

Base64 is encoding, not encryption — anyone can reverse it. Your text never leaves your browser.

Base64 turns text — and binary data — into a safe string of letters, digits and two symbols. It is the reason an image can travel inside an email and an API key can sit in a settings file. This free Base64 encoder and decoder does the conversion in your browser, handles accents and emoji correctly, and never sends your text anywhere.

How to encode and decode Base64

  1. Type or paste your text into the first box — or paste a Base64 string if you want to decode it.
  2. Press “Encode” to turn text into Base64, or “Decode” to turn Base64 back into text.
  3. Copy the result with “Copy result”, or save it with “Download result (.txt)”.
  4. Press “Try an example” any time to see the tool work with the word “Hello”.

Worked example

Encode the word “Hello” and you get “SGVsbG8=”. Decode “SGVsbG8=” and you get “Hello” back. The “=” at the end is padding: it fills the output out to a whole number of four-character groups. Try it above — press “Try an example”, then press “Decode” and watch the result change back.

Where Base64 is used

Frequently asked questions

What is Base64?
Base64 is a way of writing binary data as plain text. It uses 64 characters — A to Z, a to z, 0 to 9, plus + and / — with = as padding at the end. Three bytes of data become four Base64 characters, which is why the output is always a multiple of four characters long.

Why is Base64 used?
Because many systems only handle plain text safely. Email, web addresses, JSON and configuration files can mangle raw binary data, but they carry Base64 strings without trouble. Encoding the data first lets it pass through systems that were never built for it.

Is Base64 encryption?
No. Base64 is encoding, not encryption. It changes how data looks, not who can read it — anyone can decode a Base64 string in seconds. Never use it to hide passwords, tokens or anything secret.

Does Base64 make data bigger?
Yes, by about a third. Every three bytes of input become four characters of output, so the encoded version is roughly 33% larger than the original. That is the price of making binary data safe for text systems.

Limitations

This tool encodes and decodes text only. It does not encode files, and it is not a way to protect secrets — Base64 is encoding, not encryption, and anyone can reverse it. Very long pastes are handled in the browser, but extremely large inputs may be slow on older devices. Read the Disclaimer and Privacy Policy. Browse the full tools directory. Related reading: What Is Base64 Encoding? Encode and Decode Explained.

Going further with the Base64 Encoder & Decoder

The tool above handles the conversion in a click. The notes below cover the two mistakes people make most often with Base64.

Mind the padding

A Base64 string ends with one or two “=” signs when the input did not divide evenly into groups of three bytes. Leave them in. Without the padding, many decoders will refuse the string or read it wrong.

Accents and emoji need UTF-8

Plain btoa() in JavaScript fails on characters outside the basic Latin set, which is why this tool converts text to UTF-8 bytes first with TextEncoder. The same applies in your own code: encode the text as UTF-8, then Base64-encode the bytes.

Limitations, in more detail

This tool works on text. It cannot encode a binary file, and it cannot tell you whether a Base64 string hides a file or an image — for that you need to know what the original data was. It also accepts only the standard Base64 alphabet; URL-safe Base64, which uses - and _ instead of + and /, will be reported as invalid. Treat any Base64 string you find as public: decoding takes a moment, so secrets must never be stored in Base64.