Skip to content

Base64 Encode / Decode

Encode text to Base64 or decode it back, with full support for accents and emoji. You can also turn any file into Base64 or a data URI.

File to Base64

Convert an image or any file into Base64 or a data URI for HTML and CSS. Files stay on your device.

How to encode and decode Base64

Choose Encode, type or paste your text, and the Base64 appears instantly. Switch to Decode to turn Base64 back into text; the result moves across automatically so you can check a round trip. Text is handled as UTF-8, so accents, Chinese characters and emoji survive intact.

To embed an image in HTML or CSS, use File to Base64 and copy the data URI, for example background-image: url(data:image/png;base64,…). Keep embedded files small: Base64 makes them about 33% larger.

Frequently asked questions

What is Base64?

Base64 represents binary data using 64 safe text characters (A–Z, a–z, 0–9, + and /). It is used to put images in CSS or HTML, send attachments in email, and pass data in JSON or URLs.

What is URL-safe Base64?

It replaces + with - and / with _ and drops the = padding, so the result can go in a URL or file name without escaping. JWT tokens use this form.

Is Base64 encryption?

No. Anyone can decode Base64. It only changes how data is written, so never use it to hide passwords or secrets.