File to Base64 Converter
Turn any file into Base64 text or a data URI. The file is read on your device and never uploaded.
How to convert a file to Base64
Choose a file
Pick it from your device or drop it in.
Choose the output
Base64, a data URI or Base64URL.
Copy or download
Paste it into your code, or save it as a file.
When to use File to Base64 Converter
You need a small file inside a JSON body, an HTML page or a CSS rule, with no separate request.
An API expects a file as Base64 text, and you want to test it with a real document.
Tips for a better File to Base64 Converter result
Choose plain Base64, a data URI or Base64URL to match where the text will go, and wrap lines at 76 characters only if a system asks for it.
Keep files to a few megabytes, because the output is about one third larger than the file.
File to Base64 Converter: limits and what to check
The file name and type are taken from the data URI, or default to application/octet-stream, so set them if the receiver needs them.
Very large files make very long text and are limited only by your device's memory.
About File to Base64 Converter
Turn any file into Base64 text, a data URI or Base64URL, for embedding in JSON, HTML, CSS or an API request. The file is read on your device and never uploaded.
FAQs
Is there a size limit?
Only your device's memory. Very large files make very long text, so keep it to a few megabytes.
How much bigger does it get?
About one third larger.
Can I turn it back into a file?
Use Base64 to File Converter.