Base64 Encode / Decode
About this tool
Base64 represents any binary data — text, images, PDFs — using only 64 printable ASCII characters, so it can travel safely through systems that only handle text. This tool encodes and decodes Base64 in two modes: a text mode for strings (full Unicode supported) and a file mode for images and documents.
In file mode you can drag and drop a file to get its Base64 string, or paste a Base64 string to rebuild the original file and download it. Text and files are processed locally in your browser, so nothing you paste or drop is ever uploaded.
Remember that Base64 is an encoding, not encryption: it makes data text-safe, but anyone can decode it back.
How to use
- Pick Text mode for strings, or File / Image mode for files.
- Enter text or drop a file, then press Encode to get the Base64 string.
- To reverse it, paste a Base64 string and press Decode.
- Use Copy for text output, or Download to save a decoded file.
Common use cases
- Embedding small images or fonts directly in HTML, CSS, or JSON as data URIs
- Sending binary data through text-only channels such as JSON APIs or email
- Inspecting the contents of a Base64 token or attachment
- Storing a small file inline in a config file or script
Frequently asked questions
Does Base64 encrypt my data?
No. Base64 is an encoding, not encryption — anyone can decode it. Don't use it to protect sensitive data.
Can I encode images and files?
Yes. Switch to file mode and drag & drop an image or file to get its Base64 string, or paste Base64 to decode it back into a downloadable file.
Why is the Base64 string longer than the original?
Base64 represents every 3 bytes as 4 characters, so the output is about 33% larger than the input.
Can I decode a data URI?
Yes. Paste the part after the comma of a data: URI into text or file mode to recover the original content.
Is there a size limit?
The only limit is your device's memory, since everything is processed in the browser. Very large files may briefly slow the page while they encode.