Base64 Encoder/Decoder
Safely convert text and files to Base64 or decode Base64 back to original. All processing is done locally.
How to Use
- STEP 1
- Choose the Text/File tab.
- STEP 2
- Toggle Encode/Decode and enter input (or select a file) to get results instantly.
- STEP 3
- Optionally enable data URI output and set a MIME type.
- STEP 4
- Use Copy or Download to utilize the results.
Notes
- All processing happens locally in the browser; no data is sent to servers.
- Text decoding assumes UTF-8. Use the File tab for binary.
- Very large files may stress device memory.
Tips
Base64 represents binary as 64 characters. Used in email and data URIs.
Data URI example: data:image/png;base64,.... You can embed it directly in CSS/HTML.
When using in URLs, URL-encode as needed.
The trailing = is padding. In URLs it may appear as %3D after encoding.
URL-safe Base64 (using - and _) differs from standard Base64 (using + and /). Choose appropriately for your use case.
Round-tripping text→Base64→text is safe when the encoding matches (this tool uses UTF-8).
Very large files can exhaust memory. Hundreds of MB may hit browser limits.
Data URIs are handy but can bloat HTML/CSS bundles. Consider caching implications.
FAQ
QUESTION 1
Why not use btoa/atob?
For Unicode support, we convert using TextEncoder/TextDecoder and then Base64 encode/decode.
QUESTION 2
Which MIME type should I use?
For images, use image/png or image/jpeg; for text, text/plain; charset=utf-8, etc. It works even if not specified.
QUESTION 3
Can I save the decoded result as a file?
Yes. In the File tab, you can download the decoded file.
QUESTION 4
Can I paste a data URI to decode?
Yes. The leading data:[mime];base64, is stripped automatically before decoding.
QUESTION 5
Will Unicode (e.g., Japanese) break?
The Text tab round-trips with UTF-8. If input Base64 was encoded with a different charset, you may see garbling.
QUESTION 6
Is there a maximum size?
Depends on browser and device memory. Very large inputs (hundreds of MB) can fail. Chunked streaming isn’t supported yet.
QUESTION 7
Do you support URL-safe Base64?
We accept input as-is. If needed, replace -/_ with +/ and try again to normalize.
QUESTION 8
Any security caveats?
Base64 is not encryption. Do not use it for secrecy. Use proper encryption and secure storage for sensitive data.