CX ConvertX
Tools

Base64 encode and decode: text, images, files

Turn text or any file into Base64 — or paste Base64 and get the text, image or file back. In your browser.

This is not valid Base64 (or it does not decode to UTF-8 text). Check for stray characters.

Runs in your browser. Nothing leaves your device.

What is Base64 for?

Base64 writes binary data using only 64 safe characters — letters, digits, + and /. That lets images, files and arbitrary text travel through places that only accept plain text: JSON, XML, e-mail, URLs and HTML.

The most common use on the web is the data URL: an image written as data:image/png;base64,… and placed straight into an <img> tag or a CSS background, which saves one request for small icons. Pick "File → Base64" and keep the prefix ticked to get exactly that.

Base64 is an encoding, not encryption. Anyone can decode it, and it makes data about a third bigger, so it suits small files and is a poor choice for large images.

To restore a file, paste the Base64 under "Base64 → file". The type is read from the data URL or detected from the first bytes, so PNG, JPEG, GIF, WebP, SVG and PDF come back with the right extension.

Related converters → Coordinate converter Subtitle sync JSON ↔ CSV converter Color converter File size & download time QR code generator

Frequently asked questions

Yes. Text is converted to UTF-8 bytes first, so any language round-trips exactly. Tools that skip this step produce errors on non-Latin text.
A variant that swaps + and / for - and _ and drops the = padding, so the result can sit in a URL or a file name. JWT tokens use it. The decoder accepts both variants.
Every 3 bytes become 4 characters, so the output is about 33 % larger than the original.
No. Encoding and decoding happen in your browser; nothing is sent to our server.