Image
Image to Base64
Convert an image into a Base64 data URI you can embed directly in code.
Image
Click to choose an image
or drag & drop it here
or drag & drop it here
Copied
Convert an image to a Base64 data URI
This tool turns an image into a Base64 data URI, a long text string that represents the whole image. Paste it straight into HTML as a src or into CSS as a background so the image loads inline without a separate file request. Everything runs locally and the image is not uploaded.
How to convert an image to Base64
Drop in or choose an image, copy the data URI, and paste it into your HTML or CSS.
Frequently asked questions
When is inlining an image a good idea?
For small icons and images used once, it saves a network request. For large images it bloats your code and is usually better left as a normal file.