Image to Base64 (and Back)
Convert any image to a Base64 data URL, or paste a data URL to preview and download the image. 100% in your browser.
About Image to Base64 (and Back)
Drop in or select an image to convert it into a Base64 data URL you can copy and paste straight into CSS, HTML, or JSON. Going the other way, paste a data URL and the tool renders a preview and lets you download it back as a normal image file.
The image is processed entirely in your browser, so it is never uploaded to a server. Inlining small images as data URLs can remove an extra HTTP request, which is a common reason developers embed icons or sprites directly in their stylesheets.
Frequently asked questions
- When should I inline an image as Base64?
- It works well for small assets like icons. Large images become bulky as Base64 and are usually better served as separate files.
- Why is the data URL larger than the original file?
- Base64 encoding adds roughly a third in size because it represents binary data using a limited set of text characters.
- Which image formats are supported?
- Common web formats such as PNG, JPG, GIF, and WebP can be converted, and the data URL keeps the original type.