Base64 encode and decode

Encode text to Base64, or decode Base64 back to text, as you type. Works with every language and with URL-safe Base64.

Your files stay on your device. Nothing is uploaded.

Base64 encode and decode

Updates as you type

Step 1: Type or paste text

Step 2: Encode or decode

Direction
Variant

Step 3: Result

How to encode and decode Base64

  1. Paste text or Base64

    Paste the text to encode, or the Base64 to decode.

  2. Choose encode or decode

    Pick the direction. For encoding, choose URL-safe if the result goes into a web address or a token.

  3. Copy the result

    The result appears as you type. Copy it or download it.

About this tool

What Base64 is

Base64 writes any data with 64 safe characters (A-Z, a-z, 0-9, + and /), so it can travel through email, JSON, URLs and HTTP headers. It is an encoding, not encryption: anyone can decode it.

Every language

Text is turned into UTF-8 bytes before encoding, so Urdu, Arabic, accented letters and emoji encode and decode correctly, unlike tools that only handle English.

URL-safe Base64

URL-safe Base64 uses - and _ instead of + and / and drops the = padding. It is used in web tokens (JWT) and web addresses. Decoding accepts both kinds.

Privacy

This tool runs in your browser, on your own device. Your files and text are not uploaded to our server and we cannot see them. When you close or reload this tab, they are cleared, along with the results.

Frequently asked questions

Why does decoding say "binary data"?

That Base64 holds a file, such as an image, not text. To turn an image into Base64, use Image to Base64.

Is Base64 secure?

No. It hides nothing; never use it to protect passwords or secrets.

Is my text uploaded?

No. It runs in your browser, so nothing you type is sent anywhere.

Why is Base64 longer?

Every 3 bytes become 4 characters, so Base64 is about a third longer than the original.