Developer & text tools

Base64 encoder and decoder.

Convert text to Base64 and back, with full support for Urdu, Arabic and emoji. Or choose an image or file to get its Base64 and a ready-to-use data URI. Everything happens in your browser, and nothing is uploaded.

  • Free, no sign-up
  • Runs in your browser. Nothing you enter is sent to us.

Result

How to use the base64 Encoder & Decoder

  1. For text, choose Encode or Decode and paste it in. The result appears straight away.
  2. Tick URL-safe if the result will go in a web address.
  3. For a file, open the File tab and choose it. Copy the Base64 or the data URI.

What Base64 is for

Base64 writes any data, even an image, using only ordinary letters, numbers and a few symbols, so it can travel through systems built for text. You'll meet it in email attachments, API tokens, and data URIs that place a small image directly inside HTML or CSS.

Base64 is not encryption

Anyone can decode it in a second, as this page shows. Never use it to protect passwords, keys or private data. If you see credentials in Base64 in a website's code, treat them as public. For strong passwords, use our password generator.

Should you put images in your CSS or HTML?

Usually only for very small ones, such as a little icon. Base64 makes a file about 33 percent bigger, and the image can't be cached separately, so it weighs down every page that includes it. For anything else, a normal image file is faster. The image compressor makes those smaller, and a small logo is often best as an SVG.

Questions

About the base64 Encoder & Decoder.

Does it work with Urdu, Arabic and emoji?

Yes. Text is treated as UTF-8, which handles every language and emoji. Many simple converters fail on these.

What is URL-safe Base64?

It replaces + and / with - and _, and drops the = padding, so the result can sit safely in a web address. Decoding here accepts both forms.

Why does decoding fail?

The text contains characters Base64 does not use, or part of it is missing. If it decodes to something other than text, such as an image, use a tool made for that file type.

Is my file uploaded?

No. Your browser reads the file on your own device.

What is a data URI?

A way to put a file directly inside HTML or CSS. It looks like data:image/png;base64,... and can be used wherever a file address goes.

Want this done for you?

Free tools show you what to fix. We fix it, measure it, and keep it working while you run the business.