Tools

Base64 encode and decode

Turn text or a file into Base64, or decode Base64 back. Accented characters work correctly, and images become ready-to-use data URIs.

The file is encoded in your browser
Base64

Everything happens in your browser - nothing you type here is sent to any server.

How it works

What Base64 is

Base64 writes any data - text, an image, a file - with just 64 safe characters (letters, digits, + and /). So binary data can travel where only text fits: in an email, JSON, a URL or a CSS file. Encoded data is about a third longer.

Base64 is not encryption

Anyone can decode Base64 with one click, so it's no way to hide passwords or data. The URL-safe variant replaces + and / with - and _ so the result can safely go into a web address.

Frequently asked questions

Why do accented characters break in other decoders?

Base64 encodes bytes, not letters. This tool turns text into UTF-8 bytes, like most websites and systems do, so “zażółć” comes back as “zażółć”.

How do I put an image in HTML or CSS as Base64?

Choose the file and tick “As a data URI”. Paste the result as the image's src or a CSS url(). It's only worth it for small graphics such as icons.

Are my files uploaded anywhere?

No, the file is read and encoded in your browser.

Let's talk about your project

Briefly describe what you need and I'll reply as soon as I can. Rather talk right away? Pick a time for a short online call.