Image compressor
Reduce JPEG and WebP file sizes with adjustable quality and dimensions.
Image toolsTurn a small image into a data URL for HTML, CSS and prototypes.
Choose your file or files, then select Create data URL.
Create a Base64 data URL from an image without changing its original bytes. This is useful for small embedded assets or quick prototypes. Base64 usually increases the encoded payload by about one third, so separate image files are generally better for large website images.
Select a small JPEG, PNG or WebP file.
Generate the data URL.
Copy the complete result into your HTML or CSS.
This tool limits input to 2 MB to keep the output manageable. Use ordinary image files for larger assets.
Yes. Use the full result as the src value of an img element. Content Security Policy rules on your website must allow data images.