Base64 Image Encoder
Turn any image into a base64 data URI you can paste into HTML, CSS, or JSON. Everything runs in your browser — your image is never uploaded.
PNG, JPG, GIF, WebP, SVG and other image formats are supported.
Result
| Original file size | - |
|---|---|
| Base64 data URI size | - |
| Size increase | - |
Base64 turns every 3 bytes into 4 text characters, so encoded output is always about 33 percent larger than the original file.
How to use
- Pick an image file (up to 5 MB) with the file picker above.
- See the preview and compare the original size with the base64 size.
- Copy the data URI to your clipboard, or download it as a text file.
- Paste the data URI anywhere a normal image URL works, for example in an
<img src="...">tag.
The file is read locally with JavaScript. Nothing is uploaded or stored anywhere.