Base64 encode and decode

Convert text to Base64 and back.

This tool needs JavaScript. Please turn it on in your browser.

How to use it

  1. Step 1

    Paste your text or Base64 string into the input box.

  2. Step 2

    Press Encode to convert text to Base64, or Decode to convert Base64 to text.

  3. Step 3

    Tick URL-safe if the result will be used inside a web address.

  4. Step 4

    Copy the result.

About this tool

Base64 represents data using only letters, digits and a few symbols, so it can travel safely through systems made for plain text, such as email, JSON and web addresses. It is encoding, not encryption: anyone can decode it, so never use it to hide passwords.

This tool converts text through UTF-8, so Urdu, Arabic and other non-English text encodes and decodes correctly. URL-safe mode replaces plus and slash with dash and underscore and removes the equals signs at the end.

Decoding fails if the input contains characters that are not Base64, or if the decoded bytes are not valid text, for example when the Base64 holds an image rather than words.

Questions

Is Base64 encryption?

No. It is a reversible way to write data as text. Anyone can decode it.

Why does decoding fail?

The input may not be valid Base64, or the decoded data may be binary such as a picture rather than text.

What is URL-safe Base64?

A variant that uses dash and underscore instead of plus and slash, and drops the trailing equals signs, so it fits inside a web address.

Does it support Urdu?

Yes. Text is converted through UTF-8, so Urdu and other languages survive the round trip.

WhatsApp