How do I convert an image to Base64 online?+
Drag and drop your image (JPG, PNG, SVG, WEBP) or click to upload. The tool instantly generates the Base64 string, ready to use as a data URI in CSS or HTML.
When should I use Base64 images in CSS?+
Use Base64 encoding for small images like icons, logos, and UI elements (under 5KB). This eliminates HTTP requests for these assets, which can slightly improve performance. For large images, external URLs are better.
How do I use a Base64 image in CSS?+
Use it as a background-image: background-image: url('data:image/png;base64,iVBORw0KGgo...'); The tool automatically generates this CSS snippet ready to copy.
How do I use a Base64 image in HTML?+
Use it as the src attribute of an img tag: <img src='data:image/png;base64,iVBORw0KGgo...'/>. The tool generates this HTML snippet for you.
Does Base64 encoding make images larger?+
Yes. Base64 encoding increases file size by approximately 33% compared to the binary original. This is a trade-off, you save an HTTP request but the data is larger. It's worth it for very small images but not for large photos.
Can I decode a Base64 string back to an image file?+
Yes. Switch to Decode mode, paste your Base64 string (with or without the data:image/... prefix), and the tool renders the image and lets you download it as a file. This is useful for extracting embedded images from HTML source code or API payloads.
How do I convert an image to a Base64 data URI?+
Drop in a JPG, PNG, GIF, WebP or SVG and the tool outputs the Base64 string plus ready-to-paste snippets: a data URI, an img src and a CSS background-url. Conversion is local, so the image is never uploaded.
How do I decode a Base64 string back to an image?+
Paste the Base64 (or full data URI) and the tool renders and lets you download the original image, useful for extracting an embedded image from CSS or HTML.
Why would I embed an image as Base64?+
Base64 embeds the image directly in HTML, CSS or an email so there is no separate file to load, handy for small icons and inline assets, though large images are better left as normal files.
Does Base64 make images bigger?+
Yes, by about a third, since binary is represented as text. That's why it's best for small assets where avoiding a request outweighs the size.
Is my image uploaded to encode it?+
No. Encoding and decoding happen entirely in your browser.