How to use it
- Choose Encode to turn text into Base64, or Decode to turn Base64 back into text.
- Type or paste into the box. The result appears as you type; press Copy to take it.
- Tick URL-safe if the result goes into a web address or a token.
To convert a file, choose it under File to Base64: you get its Base64 and a ready-made data URL. If decoded Base64 turns out to be a file rather than text, press Save decoded Base64 as file to download it.
What is Base64?
Base64 turns any data (text, images, files) into plain letters, digits, + and /. It's used when binary data has to travel through systems that only handle text: email attachments, data URLs in HTML and CSS, JSON APIs and HTTP authentication headers.
Base64 is not encryption. Anyone can decode it, so never use it to hide passwords or secrets.
URL-safe Base64
Standard Base64 uses + and /, which have special meanings in URLs. The URL-safe variant (used in JWT tokens, for example) replaces them with - and _ and usually drops the = padding. The decoder here accepts both forms automatically.
FAQ
Why is the Base64 longer than my text?
Base64 represents every 3 bytes with 4 characters, so the result is about 33% bigger than the original.
Why does "é" become two bytes?
Text is encoded as UTF-8 first, the standard on the web. Letters outside basic English take 2 to 4 bytes in UTF-8.
What is a data URL?
A data URL puts a whole file inside a link, such as data:image/png;base64,iVBOR…. You can use it as an image source in HTML or CSS without a separate file. It suits small icons; large images are better as normal files, because Base64 makes them a third bigger.
Is there a size limit?
Files up to 50 MB can be converted. Larger files would make the page too slow to show as text.