Image to Base64 Encoder
Encode an image file as a Base64 data URI for use directly in HTML or CSS.
Why use this tool?
Convert an image into a Base64 data URI to embed it directly in HTML, CSS or JSON without a separate file. Best for small icons, since Base64 is about a third larger than the file.
How to use it
- Upload an image.
- Choose the data URI, raw Base64, HTML or CSS snippet.
- Click Copy.
Related tools
- Color Picker from Image - Click anywhere on an image to read the exact HEX, RGB and HSL color at that point.
- Image Resizer - Resize images to exact pixel dimensions with optional aspect-ratio lock, exported as PNG, JPG or WebP.
- Image Compressor - Shrink image file size with adjustable JPG or WebP quality and an optional maximum width, with before/after sizes.
- Background Remover - Remove solid or near-solid backgrounds (product shots, logos, green screens) by color, with edge-connected removal.
- Base64 to Image Decoder - Decode a Base64 string or data URI back into a viewable, downloadable image.
- Image Format Converter - Convert between PNG, JPG, and WebP formats using native browser encoding.