← All tools

Base64 encode and decode

Turn text into Base64 or decode it back. Your data never leaves this computer.

Action

What Base64 is and where it is used

Base64 is an encoding that turns binary data (images, files, text with special characters) into plain text made of letters, digits and a few symbols, so it can pass undamaged through places that only accept text. Email attachments travel as Base64 behind the scenes; small images are embedded in web pages as "data:image/png;base64,..."; APIs send usernames and passwords in Base64 for "Basic" authentication; and the parts of a JWT are Base64 URL encoded.

Base64 turns every 3 bytes into 4 characters, so encoded data is about 33% longer than the original.

Base64 is not encryption

The most common mistake is treating Base64 as a way to hide data. Anyone can decode Base64 in seconds; no key or password is needed. Passwords "hidden" with Base64 in a config file or in code are really in plain sight. Use real encryption to protect secrets.

Special characters and URL-safe Base64

This tool processes text as UTF-8, so accented letters, non-Latin scripts and emoji encode and decode correctly. If text encoded with another tool comes out garbled here, that tool probably used a different character encoding.

URL-safe Base64 uses - and _ instead of + and /, and drops the trailing = signs, so the value causes no trouble in the address bar or in file names. Encoding and decoding happen in your browser and your data is never sent anywhere.

How to use it

  1. Type or paste the text or the Base64 string into the box.
  2. Choose Text to Base64 or Base64 to text.
  3. Copy the result.

Frequently asked questions

Are accented characters supported?

Yes. Text is handled as UTF-8, so letters like ş, ğ, é and emoji work fine.

What is URL-safe Base64?

It uses - and _ instead of + and / from standard Base64 and drops the trailing =. It is used for JWTs and data carried in URLs.

Is Base64 encryption?

No. Base64 is only an encoding and anyone can decode it. Do not use it to protect secret data.

Related guide

Related tools