Base64 Encode and Decode: convert text and files, free in your browser.
Turn text, images and files into Base64, or decode Base64 back. Nothing leaves your browser.
Your input is processed in your browser. Nothing is uploaded.
Avoid pasting passwords or secret keys into any online tool.
Your text
0 characters
Base64 result
Type or paste some text above and the Base64 appears here as you type.
How to Base64 encode or decode online
- 1.Choose the Text tab for text or the File tab for images and other files.
- 2.To Base64 encode, pick Encode and type or paste your text. To Base64 decode, pick Decode and paste the Base64 string.
- 3.The result appears as you type. Turn on URL-safe Base64 if you need a version for links.
- 4.For a file, add it to get its Base64 text, or paste Base64 to turn it back into an image, a PDF or another file.
- 5.Copy the result or download the file.
Why use this Base64 encoder and decoder?
- Text and files: Base64 encode text, images and other files, or decode Base64 back to text, an image or a PDF.
- Works with any language: text is converted as UTF-8, so Urdu, Arabic, accents and emoji work.
- Understands data URIs: paste data:image/png;base64,... and see the picture.
- URL-safe option and line wrapping for links, tokens and email.
- Private: everything happens in your browser and nothing is uploaded.
- Free, with no sign-up.
What is Base64?
Base64 is a way to write binary data, such as an image or a file, with 64 plain text characters: A to Z, a to z, 0 to 9, plus and slash. Because it is only text, it travels safely through emails, JSON, web addresses and headers, where raw binary data may break. A Base64 decoder reads that text back into the exact bytes it came from, so any Base64 string can be turned back into the original file. The price is size: Base64 makes data about one third bigger. Base64 is not encryption. Anyone can decode it, so never use it to hide passwords or secrets.
Tips before you encode or decode Base64
- If the Base64 decode fails, check for missing characters or extra text. This tool ignores spaces and line breaks, and accepts a missing = at the end.
- If the decoded text looks like random symbols, the data is probably a file, such as an image or a PDF. Use the File tab.
- Images become about one third bigger as Base64. Shrink them first with Compress Image if you plan to embed them.
- Need to format the data inside? Try the JSON Formatter & Validator, or URL Encode / Decode for web addresses.
Common uses
Embedding a small image in HTML or CSS as a data URI, reading a Base64 value from an API or a JSON response, looking inside the parts of a JSON Web Token (they are Base64URL text, and decoding them does not verify the signature), and turning a Base64 string from a database into a PDF or an image file.
Frequently asked questions
Is this Base64 decoder and encoder free?
Yes. There is no sign-up and no limit on how often you use it.
Is my data uploaded anywhere?
No. Everything happens in your browser and nothing is kept after you close the tab.
What is Base64 used for?
It is used to put binary data, such as images and files, into places that only accept text, such as email, JSON and data URIs.
Is Base64 encryption?
No. It only changes how data is written. Anyone can decode it.
How do I convert Base64 to an image?
Open the File tab, paste the Base64 string or the data URI under "Base64 to file" and you see the image with a Download button.
How do I convert an image to Base64?
Open the File tab, add the image under "File to Base64" and copy the Base64 text or the data URI.
What is URL-safe Base64?
A version that uses - and _ instead of + and / and often drops the = at the end, so it can be used inside links and tokens.
Why does decoding show strange characters?
The data is probably not text. It may be an image or another file. Use the File tab to download it.
Does it support Urdu, Arabic and emoji?
Yes. Text is converted as UTF-8.
Is there a file size limit?
Files up to about 25 MB work in a modern browser, but large files can be slow.
Want to understand Base64? Read What Is Base64 and how does it work.
Toolezs