Encode a File to Base64
To encode a file to Base64, add any file, choose whether to output a data URI or wrap lines at 76 characters, and click Base64 Encode. You get a .b64.txt file with the standard Base64 text, and large files are encoded in chunks. Encoding runs in your browser, so the file is never uploaded.
Plain Base64 or a ready-to-paste data URI, with optional MIME line wrapping
Choose Files
or drop documents directly into this area
Quick facts
- Formats
- Any file → Text (TXT); several results come as one ZIP
- Where it runs
- In your browser, on your own device. Files are not uploaded.
- Size limit
- 300 MB per run on a computer, 80 MB on a phone or tablet
- Files per run
- Up to 50
- Last updated
How to use Base64 Encode
Choose any file.
Optionally turn on Output as a data URI or Wrap lines at 76 characters (MIME).
Click Base64 Encode.
Download the .b64.txt file.
Features & Privacy
Fast & High Quality
Private: Files Never Leave Your Device
Batch Processing
Frequently Asked Questions
A data URI puts the file type in front of the Base64 text, such as data:image/png;base64, so you can paste it straight into HTML or CSS as an image or font.
Turn it on for email (MIME) or systems that expect short lines. Leave it off for JSON, code or data URIs; wrapping is never applied to data URIs.
The encoder writes standard Base64 using + and / with = padding. The Base64 Decode tool can read both standard and URL-safe text that uses - and _.
Base64 text is about one third larger than the original file, because every 3 bytes become 4 characters. Line wrapping adds a little more for the line breaks.
Up to about 300 MB on a computer and 80 MB on a phone or tablet. Large files are encoded in chunks, so the page stays responsive while it works.
No. Encoding runs in your browser on your own device, so the file never leaves it. Any file type works, from images to PDFs and archives.
Related Tools
Continue your workflow with these related tools: