Image to Base64
Convert any image (PNG, JPG, WebP, GIF, SVG) into a Base64 data URI you can embed directly into HTML, CSS or JSON. 100% local.
Drop an image
PNG · JPG · WebP · GIF · SVG
What is the Image to Base64?
The Image to Base64 tool converts an image into a data URI — a text string starting with "data:image/…;base64," that embeds the whole image. Paste it into HTML, CSS or JSON to ship an image without hosting a separate file.
Ready-to-paste HTML <img> and CSS background-image snippets are generated alongside the raw string. Encoding runs in your browser.
How to use the Image to Base64
- 1Upload the image to encode (PNG, JPG, GIF, WebP or SVG).
- 2Copy the generated data URI, or the ready-made HTML / CSS snippet.
- 3Paste it into your source code or JSON payload.
Key features
- One-click Base64 generation
- HTML <img> and CSS background-image snippet copy
- Supports PNG, JPG, GIF, WebP and SVG
- File-size warning for oversized inputs
Important notes
- Base64 inflates file size by about 33% — keep it to small icons and thumbnails (under ~20 KB). Large images should be served as normal files.
Frequently asked questions
Can I decode a Base64 string back into an image?
Yes — paste the data URI into a browser address bar to view and save it.
Does the browser cache Base64 images?
Not individually — they are cached only as part of the file that contains them.
All Image Tools
Tap any tool to jump straight in — no signup, works on mobile.