Encode text or files to Base64 and decode Base64 back to text. Supports UTF-8, emoji and URL-safe Base64. Free and private: nothing leaves your browser.
Encode a file: drop it here or click to choose (images, PDFs, anything)
💡 Would you like a new tool or feature, or did something not work? Tell us at [email protected]
How to encode or decode Base64
Pick Encode to turn text into Base64, or Decode to turn Base64 back into text.
Type or paste into the input box. The result appears instantly as you type.
Tick URL-safe if the result goes into a URL or a token.
To encode a file, drop it on the box at the bottom. You get a data URL you can use as an image src.
How Base64 works
Base64 takes 3 bytes (24 bits) at a time and splits them into four groups of 6 bits. Each group is a number from 0 to 63, written as one of the characters A–Z, a–z, 0–9, + and /. When the input isn't a multiple of 3 bytes, = signs pad the end. For example, Hi! becomes SGkh.
This tool encodes text as UTF-8 first, so accented letters, other alphabets and emoji round-trip correctly. Many simple encoders don't do this and break on characters outside English.
Frequently asked questions
Is Base64 encryption?
No. Base64 is an encoding, not encryption: anyone can decode it. It's a way to represent binary data using only 64 safe text characters, so it can travel through systems that only handle text, like email or JSON.
Why does Base64 make data bigger?
Base64 uses 4 characters for every 3 bytes, so encoded data is about 33% larger than the original. That's the price for being plain text.
What is URL-safe Base64?
Standard Base64 uses + and /, which have special meanings in URLs. URL-safe Base64 (Base64url) replaces them with - and _ and usually drops the = padding. It's used in JWTs and URL parameters. This tool decodes both kinds automatically.
Can I convert an image to Base64?
Yes. Choose a file or drop it on the drop zone and you'll get the Base64 text and a ready-to-use data URL, which you can put straight into HTML or CSS. The file never leaves your computer.