Text tools · free

Base64 encoder & decoder

Encode text, decode it back, or turn a small image into a data URI you can paste straight into your CSS.

Your text

Everything runs in your browser.

Accents, emoji and other non-English characters are handled properly
Best under about 10KB — bigger files bloat your CSS more than they save

Output

0 in 0 out change

What Base64 actually is

It is a way of writing any data using only 64 safe characters — letters, digits, plus and slash. That lets binary data travel through systems that only accept text: email attachments, JSON fields, data URIs in CSS.

Hello → SGVsbG8=

Two things people get wrong

  • It is not encryption. Anyone can decode it instantly — this page does it without a password. Never use it to hide an API key or a token.
  • It makes data bigger, not smaller. Every 3 bytes become 4 characters, so everything grows by roughly 33%. It is a transport format, not compression.

The UTF-8 trap

The browser's built-in btoa() throws an error on anything outside Latin-1 — including the pound sign in some contexts, accented letters, Indian scripts and every emoji. A lot of online Base64 tools either crash or quietly corrupt the text.

This one encodes to UTF-8 bytes first, so , café and emoji all survive the round trip intact.

When a data URI is worth it

Embedding an image directly in your CSS or HTML saves one network request. That is genuinely useful for a tiny icon or a 1×1 spacer.

It stops being useful fast. A data URI is about a third larger than the file, it cannot be cached separately from the page, and it blocks rendering while it is parsed. Under about 5KB, embed. Over 10KB, link.

URL-safe Base64

Standard Base64 uses + and /, which both have meaning inside a URL. The URL-safe variant swaps them for - and _ and drops the = padding. Tick the box if the result is going into a query string or a filename.

Common questions

Is Base64 secure?

No, and this is the most important thing to know about it. It is encoding, not encryption. Anyone can decode it in seconds. Never use it to protect a password, key or token.

Why does my encoded text get longer?

Base64 represents every 3 bytes as 4 characters, so output is about 33% larger. That is inherent to the format — it exists to make binary safe as text, not to compress it.

Does it handle emoji and Indian languages?

Yes. The text is converted to UTF-8 before encoding, which is what many other tools skip. Round-tripping ₹, café or an emoji returns exactly what you started with.

Should I embed images as data URIs?

Only tiny ones. Under about 5KB the saved request is worth it. Larger than that and you lose more in page weight and lost caching than you gain.

Are my files uploaded?

No. The file is read by your browser and never sent anywhere.

Want this checked on your real account?

A tool can only work with the numbers you give it. If you want someone to look at what is actually happening in your ad account, the first conversation is free.

Book a free consultation

Related