How it works
Choose an image from your device. It's loaded straight into the page — never uploaded — and shown as a preview. You'll get a Base64 data URI you can copy and paste directly into HTML or CSS. To shrink it, set a maximum width or height and pick an output format and quality; the image is redrawn on a canvas at the new size and you can download the smaller file. JPEG and WebP with reduced quality give the biggest savings, while PNG stays lossless. Everything happens locally in your browser.
Image to Base64 & Resizer
Encode an image as a data URI, or resize and compress it — privately.
or drag & drop it here
FAQ
What is a Base64 image data URI?
It's a text representation of an image that starts with data:image and can be embedded directly in HTML or CSS, avoiding a separate file request. It's useful for small icons and inline images.
Can I resize or compress the image?
Yes. Set a maximum width or height and the image is scaled down proportionally. Choosing JPEG or WebP output with a lower quality also reduces the file size. You can then download the result.
Are my images uploaded to a server?
No. The image is read and processed entirely in your browser using a canvas. It never leaves your device.
Which formats are supported?
You can load common formats like PNG, JPEG, WebP, and GIF, and export as PNG, JPEG, or WebP depending on your browser's support.
Related tools
Base64 & URL Encoder/Decoder · QR Code Generator · Color Converter