Image to Base64 Converter
Turn an image into a base64 data URI you can paste into HTML, CSS or JSON. Choose the output format before encoding to control the size of the string.
- Runs in your browser
- Accepts: JPG, PNG, WebP
- Produces: base64, data URI
- Max file size: 10 MB
- Free · No sign-up
Loading the tool…
How to use image to base64 converter
- Upload an image.
- Copy the generated data URI.
- Paste it into your stylesheet or markup.
Practical examples
Inlining a 24 pixel icon in CSS
Use PNG and keep the icon small. Base64 adds about 33% overhead, so only inline assets under roughly 10 KB.
Limitations to know about
- Base64 increases size by about a third, so it is unsuitable for large photos.
- Very large images produce strings that some editors handle poorly.
Privacy
This tool processes everything inside your browser. Nothing you paste or upload is transmitted to Roxie Tools or to any third party, and no copy of your input is stored. Closing the tab clears it.
See the privacy policy for how this site handles data.
Related tools
All image tools Base64 to Image Decoder Preview and save an image from a base64 string.
Open tool
Image Compressor Shrink JPG, PNG and WebP photos without visible damage.
Open tool
Image Format Converter Convert between JPG, PNG and WebP in one step.
Open tool
Compress Image to a Target Size Hit an exact KB limit for uploads, with iterative quality search.
Open tool
Version 1.0.0 · Last updated 2026-12-06 · Processing: local browser