Free tool

Base64 decode and encode, text and files.

Turn text into Base64 or read Base64 back, with any language and emoji kept intact. Switch to URL-safe Base64 for tokens and links. Drop an image or any file to get its Base64 or a data URL, with a ready HTML or CSS line for pictures. Paste Base64 that holds a file and it is recognised, previewed and ready to download. Your data never leaves the browser, so keys and tokens stay private.

Text
Base64

Decoding accepts both kinds, with or without line breaks, and data URLs too.

Everything is converted in your browser. Nothing is uploaded.

What Base64 is

Bytes as plain letters.

01 / Why

Safe in text

Base64 writes any data with 64 ordinary characters, so pictures and files can travel inside JSON, emails, HTML and CSS.

02 / Size

A third bigger

Every 3 bytes become 4 characters, so Base64 is about 33% larger than the original.

03 / Not secret

Encoding, not encryption

Anyone can decode Base64. Never use it to hide a password.

Questions

Good to know.

Why does my decoded text show odd characters on other sites?

Many simple decoders treat text as Latin letters only, which breaks accents, other alphabets and emoji. This page reads and writes UTF-8, so text comes back exactly as it went in.

What is URL-safe Base64?

A version that uses - and _ instead of + and /, and usually drops the = padding, so it can sit in a web address or a file name. JSON Web Tokens use it.

Should I put images in my CSS as Base64?

For small icons, it saves a request. For larger pictures it makes the page heavier, since Base64 is about a third bigger and cannot be cached on its own. A normal image file is usually better.

Is it safe to paste API keys or tokens here?

Yes. Everything happens in this tab and nothing is sent anywhere.

The decoder says my Base64 is cut short. Why?

A piece is missing, often from copying only part of a long line. Copy the whole value again, including any = at the end.