Skip to content

Base64 Encode / Decode

Encode text to Base64 or decode Base64 to text online. Handles UTF-8, emoji and URL-safe Base64. Private, runs in your browser.

How to use the base64 encode / decode

  1. Paste plain text to encode, or a Base64 string to decode.
  2. Click Encode or Decode.
  3. Copy the output.

About this tool

Base64 turns binary or text data into plain ASCII characters, which is how tokens, email attachments and data URIs are usually carried. This tool encodes and decodes UTF-8 text correctly, including accented letters, Indian scripts and emoji, and accepts URL-safe Base64 with - and _ characters.

Examples

TextBase64
HelloSGVsbG8=
WidePitV2lkZVBpdA==
admin:secretYWRtaW46c2VjcmV0

Base64 reads the data three bytes at a time and writes four characters for each group. When the data does not fill the last group, one or two = signs are added as padding, which is why some results end with = or ==.

Why the result is bigger

Four output characters carry three bytes of input, so Base64 text is about 33% larger than the original. That is the price for using only letters, digits, + and /, which survive email systems, JSON strings and URLs that would mangle raw bytes.

Where you will meet it

Base64 is not encryption

Anyone can decode Base64 in a second, as this page shows. Never use it to hide passwords, keys or personal data. If you need secrecy, use real encryption.

URL-safe Base64 and common errors

The URL-safe form swaps + and / for - and _ and often drops the = padding. This tool accepts both forms when decoding. If decoding fails, the usual causes are stray spaces or line breaks (email systems wrap lines at 76 characters), a missing character from copying, or text that was not Base64 to begin with. This tool handles text, so for files use a command-line tool or a file-based converter.

Frequently asked questions

Does it support emoji and non-English text?

Yes. Text is handled as UTF-8, so accented characters, Indian scripts, and emoji round-trip correctly.

Can it decode URL-safe Base64?

Yes. The - and _ characters are converted automatically before decoding.

Is Base64 encryption?

No. Base64 is an encoding, not encryption. Anyone can decode it.

Why does Base64 sometimes end with equals signs?

They are padding that fills the last group of four characters. They carry no data.

Can I decode Base64 into an image?

Not here, because this tool decodes to text. If the Base64 begins with data:image, it is a data URI that a browser can display directly.

More developer tools

Related tools