Base64 Encode and Decode

Convert text to Base64 and back. Results appear as you type.

Loading tool…

  • Free
  • No sign-up
  • Runs in your browser

How to use the base64 encode and decode

  1. Choose the direction with the buttons above the result.
  2. Type or paste your text in the top box.
  3. Copy the converted result.

What is Base64?

Base64 is a way of writing any data using only 64 safe characters: A to Z, a to z, 0 to 9, plus + and /. It exists because many systems, email in particular, were built to carry plain text and can corrupt raw binary data. Encoding the data as Base64 lets it pass through untouched. Every 3 bytes become 4 characters, so Base64 is about 33% larger than the original. One or two = signs at the end are padding.

Where you will meet it

  • Email attachments (MIME).
  • Images embedded directly in HTML or CSS as data: URLs. To do that with a picture, use the image to Base64 tool.
  • API keys, tokens and HTTP Basic authentication headers.
  • The middle section of a JWT (JSON Web Token).

Base64 is not encryption

Anyone can decode Base64. It hides nothing and must not be used to protect passwords or secrets. It only changes how data is written.

This tool handles UTF-8 properly, so accented letters, non-Latin scripts and emoji survive a round trip. The decoder also accepts the URL-safe variant that uses - and _, and input with missing padding.

Frequently asked questions

Why does my decoded text look like gibberish?

The Base64 probably represents binary data such as an image or a compressed file rather than text.

What does the = at the end mean?

It is padding that makes the length a multiple of four. It carries no data.

Is my text stored or sent anywhere?

No. Everything happens inside your browser. Your text is not uploaded, logged or read by anyone. The page remembers your last text on this device only, so you can pick up where you left off; press Clear to remove it.

Related tools