Base64 Encode and Decode, With Arabic and Files

Encode any text to Base64 or decode it, with Arabic kept intact, or turn an image or file into a Data URI to embed in CSS or HTML. All in your browser.

Encode now
مرحبا2YXYsdit2KjYpw==data:image/png;base64,…

Tool

Where Base64 is used

Email

Email attachments are sent Base64-encoded.

Basic Auth

The username and password in an Authorization header are Base64-encoded.

Data URI

Embedding a small icon in CSS without an extra request.

Important notes

Do

  • Use it to move data safely through text systems
  • Use Data URIs for small icons only

Avoid

  • Base64 is not encryption: anyone can decode it
  • Do not embed big images; size grows by about a third and they are not cached separately

Example: an icon inside your CSS

A small SVG or PNG icon of a few kilobytes can become a Data URI placed straight into CSS, so it shows without an extra request. Larger images are better compressed and kept as separate files the browser can cache.

Key terms

Short definitions of what you meet along the way.

Base64
A way to turn any data into 64 safe characters for text-based systems.
UTF-8
The encoding that stores Arabic and every language on the web.
Data URI
A link carrying the file content itself instead of its address, starting with data:.

Frequently asked questions

Did not find your answer? Ask us on WhatsApp

Why does Arabic break in other tools?

They do not convert text to UTF-8 first. Ours does, so Arabic stays intact.

Base64 vs Base64URL?

The latter swaps + and / for - and _ and drops =, so it works in URLs; JWT uses it.

Are my files uploaded?

No. Reading and encoding happen in your browser.

Building a system or app?

We build custom systems and APIs for your business.

Contact us on WhatsApp