About

Base64 Image Converter – Encode & Decode Images

Convert images to Base64 data URIs for HTML/CSS embedding, or decode Base64 strings back to viewable images.

🟢 Runs locally · no uploads

Base64 Image Converter

Convert images to Base64 and decode Base64 back to images

imageImage Input
add_photo_alternate

Drop an image here, or click Upload

Supports PNG, JPG, GIF, SVG, WebP, BMP, ICO

descriptionData URL
010 B
code

Base64 encoded image will appear here

settingsOptions

Choose output format for encoded image
Include data:image/...;base64, prefix
Compression quality for JPEG/WebP
Maximum allowed file size

keyboardKeyboard Shortcuts

keyboardShow shortcutsexpand_more
Ctrl+VPaste from clipboard
Ctrl+LClear all
Ctrl+SDownload decoded image

Related tools

Show more
Show more
› About this tool · FAQ

Convert images to Base64 and decode Base64 back to images. Bidirectional converter for embedding and extracting images.

What is Base64 image encoding?

Base64 encoding converts binary image data into a text string that can be embedded directly in HTML, CSS, or other text-based formats. This eliminates the need for separate image files.

When should I use Base64 encoded images?

Use Base64 encoding for small images (under 10KB), icons, logos, or when you need to create self-contained files. Avoid it for large images as it increases file size by about 33%.

Can I decode images from HTML or CSS?

Yes! The tool automatically extracts base64 data from HTML img tags, CSS background-image properties, and complete data URLs. Just paste the entire code snippet.

Does Base64 encoding affect image quality?

No, Base64 encoding is lossless. The image quality remains exactly the same. However, you can optionally apply JPEG compression to reduce file size.

What image formats are supported?

All common web image formats are supported: PNG, JPG/JPEG, GIF, SVG, WebP, BMP, and ICO. The original format is preserved in the encoded output.