Image to Base64
Encode an image as a Base64 data URI — paste it into CSS, HTML, or JSON. Optional CSS <code>url(...)</code> wrapper.
Drag an image here, paste from clipboard (Ctrl+V), or
PNG, JPEG, WebP, GIF, SVG. Paste a screenshot directly — no need to save it first.
How to use Image to Base64
- Pick an image.
- Toggle data: prefix and CSS wrapper as needed.
- Copy the result.
What is Image to Base64?
Base64-encoded images embed directly in HTML or CSS, avoiding an extra HTTP request. Useful for small icons, backgrounds in CSS files, or embedding in code where external assets aren't allowed. Note: encoding adds ~33% size — use only for small images.
FAQ
- When should I use Base64 for images?
- For small images (under ~5KB) that you'd otherwise load via HTTP. For larger images, a regular image file is faster overall.
- Does Base64 encoding increase file size?
- Yes, Base64 encoding typically increases the data size by about 33%, so consider the impact on load times.
- Is the encoding process private?
- Absolutely, your image is processed entirely in your browser; no data is sent to external servers.
Related tools
People also use
- Image to PDF📄 PDF Tools
Image to PDF — Pack one or more images into a single PDF — each image becomes a page. A4, Letter, Legal, or fit-to-image page sizes.
- PDF to Image📄 PDF Tools
PDF to Image — Render each PDF page to PNG, JPEG or WebP at a scale you choose (1× = 72 DPI, 4× = 288 DPI). Powered by pdf.js running locally in your br...
- Base64 Encode / Decode🔐 Encoding & Decoding
Base64 Encode / Decode — Convert any text to Base64, or decode Base64 back to readable text. Full unicode support.