Polski

Base64 encode and decode, both ways as you type

Type on the left to encode, or paste Base64 on the right to decode. Polish letters and emoji stay intact, URL-safe Base64 and data URIs just work, and files convert too. Nothing leaves your browser.

or drop a file anywhere on this panel
Everything happens in your browser. Nothing is sent or saved.

How to use it

  1. Encode: type or paste text in the left box. The Base64 appears on the right as you type.
  2. Decode: paste Base64 in the right box. The text appears on the left. If it is not text, you get a preview (for images) and a download button.
  3. Files: press Encode a file or drop one on the panel. Copy the Base64, or copy it as a data URI ready for HTML, CSS or an email signature.

Standard, URL-safe and MIME Base64

VariantCharactersWhere you meet it
Standard (RFC 4648)A–Z a–z 0–9 + / and = paddingAPIs, JSON, data URIs, most tools
URL-safe (base64url)- _ instead of + /, padding often droppedJWTs, URLs and file names
MIMEStandard, with a line break every 76 charactersEmail attachments, PEM keys and certificates

The decoder accepts all three: it ignores line breaks and spaces, adds missing padding and understands URL-safe characters.

Base64 is not encryption

Base64 only changes how bytes are written, so they survive places made for text. Anyone can decode it, in one click, as this page shows. Never use it to hide a password or a secret. It also makes data about a third bigger: every 3 bytes become 4 characters.

Questions people ask

Why does my decoded text show strange characters like ó?

The Base64 holds UTF-8 bytes, but the tool that decoded it read them as Latin-1 or Windows-1250. This page always decodes as UTF-8, so ó, ł, ą and emoji come back correctly. If text was encoded in an old code page, it was never UTF-8 to begin with.

Why is Base64 longer than the original?

Base64 writes every 3 bytes as 4 characters, so the result is about 33% longer, plus up to two = signs of padding. Line breaks in MIME add a little more.

What is URL-safe Base64 (base64url)?

The same encoding with - and _ instead of + and /, which have special meaning in URLs and file names. JWTs use it, usually without padding. Tick URL-safe to produce it; the decoder reads it either way.

Do I need the = padding?

Most decoders, including this one, work without it. Some strict ones need it. Keep it unless the place you paste into says otherwise, as JWTs and many URLs do.

How do I make a data URI for an image?

Press Encode a file, pick the image, then Copy as data URI. You get data:image/png;base64,…, ready for an <img src> in HTML or a url() in CSS. Keep data URIs for small images; large ones make pages heavy.

Is my file uploaded anywhere?

No. The file is read and encoded by your browser. Nothing is uploaded, saved or put in the URL. You can confirm it in the network panel of your browser’s developer tools.

How big can a file be?

Up to 50 MB. Larger files work in principle but make the browser slow, because the Base64 text is a third bigger than the file and has to sit in the page.

Does it work offline?

Yes. Once the page has loaded, encoding and decoding need no connection.

More free tools

All free tools →

Przemysław Zalewski

Made by one person, for real problems

I’m Przemysław Zalewski, a software engineer from Wrocław with 15+ years of shipping software. I build these tools when something annoys me, and I keep them free, fast and private. When your company needs a tool like this built properly, that is my day job.

Hire meBook a free 30-min call