File to Base64 Converter
Choose one or more files of any type and get their Base64 text - raw, as a data URI with the right MIME type, or as JSON with the file name, type and size ready for an API request. Large files are processed in pieces so the page stays responsive.
How to use the File to Base64 tool
- Drop files on the box or click to choose them.
- Pick the output format: raw Base64, data URI, or JSON for APIs.
- Copy the result or download it as a text file.
Questions and answers
How large can the file be?
As large as your browser's memory allows - usually a few hundred MB on a computer. For very large files, download the result instead of copying it.
How do I send a file in a JSON API?
Choose the JSON output: it gives {"name", "type", "size", "base64"} for each file, the shape most APIs expect for attachments.
Is the file uploaded?
No. It is read and encoded by your browser. You can even disconnect from the internet after the page has loaded.
Is my data uploaded to a server?
No. Every conversion on this page runs inside your browser with JavaScript. Your text and files never leave your computer, which is why it also works for private keys, contracts and photos.
Is the tool free?
Yes, free without sign-up and without limits other than your computer's memory. The site is paid for by the small ads on the left and at the bottom.