Image to Base64 Converter
Convert PNG, JPG, SVG, WebP and GIF images to Base64 data URIs. Drag and drop, then copy as CSS, HTML or raw string.
Drag an image here, or
PNG, JPG, SVG, WebP or GIF · up to 5.00 MB · never uploaded
About Image to Base64
Embed a small image directly in your CSS or HTML as a data URI, removing a network request. Best suited to icons and textures under about 10 KB — beyond that the roughly 33 percent size penalty of Base64 outweighs the saved round trip.
How to use it
- Drop an image onto the drop zone, or pick a file.
- Wait for the preview to appear.
- Copy the output as a raw string, a CSS background rule, or an <img> tag.
Frequently asked questions
Are my images uploaded anywhere?
No. The file is read with the browser's FileReader API and converted locally. It never leaves your device.
Why is the Base64 bigger than my file?
Base64 encodes three bytes as four characters, so the result is about 33 percent larger. That is the unavoidable cost of representing binary data as text.
When should I not use data URIs?
For anything large or reused across pages. Data URIs cannot be cached separately, so an embedded image is re-downloaded with every page that inlines it.
Trending guides
In-depth reads that go beyond the calculator.
- Trending6 min read
SIP Calculator guide
A Systematic Investment Plan is a standing instruction to put a fixed amount into a mutual fund on the same date each month. That is the whole idea. It is not a product you buy, not an asset class, and not a scheme with a guaranteed rate — it is a schedule. The returns come from whatever the underlying fund holds.
- 3 min read
BMI Calculator guide
Body Mass Index is weight in kilograms divided by height in metres squared. That is the whole calculation. It was devised in the 1830s by the Belgian statistician Adolphe Quetelet, who was explicitly describing populations rather than assessing individuals — a distinction that matters enormously and gets lost constantly.
- 3 min read
Percentage Calculator guide
Almost every percentage problem is one of four shapes. Knowing which one you are looking at is most of the work, because each has a different formula and mixing them up is where the wrong answers come from.