Base64 Encoder and Decoder

Encode text or files to Base64, or decode it back.

Mode
Encoding
Files

Runs on your device. No upload wait.

Questions

What is Base64?

A way to write any data, including images and other binary files, using only 64 safe characters (A–Z, a–z, 0–9, + and /). It’s used in email attachments, data URLs, JSON web tokens and APIs that only accept text. It isn’t encryption: anyone can decode it.

Why does my text with accents or emoji encode differently elsewhere?

Base64 works on bytes, so text must first be turned into bytes. This tool uses UTF-8, the standard on the web. Tools that use a different character encoding give different results for anything beyond plain English letters.

What is URL-safe Base64?

A variant that uses “-” and “_” instead of “+” and “/” and drops the “=” padding, so the result can go in URLs and file names. JSON web tokens use it. The decoder accepts both variants automatically.

How do I turn an image into a data URL?

Tick “Data URL prefix” and use “Encode a file”. The result, starting with data:image/png;base64,, can be pasted into HTML or CSS.

Is it free? Do I need an account?

It is free to use and there is nothing to sign up for. There are no watermarks and no daily limits.

Missing something, or not working as it should? Tell us