File to Base64 encoder
Turn any file into Base64 text, for example to embed it in HTML, CSS, JSON or an email. Drop your file in the box or type some text, and the result appears as you go.
Drop your file here
Elk soort bestand · of plak met Ctrl+V
How it works
-
Choose a file or type text
Drop a file in the box, choose it on your device or type text.
-
Encoded instantly
The Base64 result appears at once; change the options if you like.
-
Copy or download
Copy the text with one click or save it as a .txt file.
What is Base64?
Base64 writes binary data using only letters, digits, + and /, so it can travel through systems that only handle text: email bodies, JSON fields, HTML attributes and URLs. The price is size: Base64 text is about a third larger than the original file.
Options
- Data URI adds
data:image/png;base64,(or the right type for your file), so you can paste the result straight into ansrcorurl(). - URL-safe swaps
+and/for-and_and drops the=padding (base64url, as used in JWTs). - Wrap lines at 76 characters gives the classic MIME layout used in email.
Private by design
The file is read and encoded in your browser. It never leaves your device. Very long results are shortened on screen, but Copy and Download always include everything.
Frequently asked questions
Is the file to Base64 free?
Yes. The file to Base64 is completely free, with no account, sign-up or usage limit.
Which files can I encode?
Any kind of file: images, PDFs, documents, audio or text. You can also type or paste text directly.
Is my file uploaded?
No. The encoding happens in your browser; your file doesn't leave your device.