Base64 Encode/Decode

Convert images to Base64 data URIs and decode Base64 strings back to images. Perfect for embedding images inline in HTML, CSS, or JavaScript.

Drop images here or click to browse

Supports all image formats

Free Online Base64 Encoder/Decoder — Convert Images to Base64 Instantly

Convert images to Base64 data URIs and decode Base64 strings back to images with our free online tool. Upload an image to get its Base64 data URI for embedding directly in HTML, CSS, or JavaScript — perfect for reducing HTTP requests, creating self-contained web pages, or storing small images inline. You can also paste a Base64 string to preview or download the decoded image. All processing happens locally in your browser for complete privacy.

1. Upload

Upload one or more images or paste a Base64 string to decode.

2. View & Copy

View the generated Base64 data URI or the decoded image preview.

3. Use Anywhere

Copy the Base64 string to your clipboard or download the decoded image.

Tips for Using Base64 Encoder/Decoder

  • Base64 encoding increases file size by about 33%. Use it for small images (icons, logos) where the convenience of inline embedding outweighs the size increase.
  • Data URIs are perfect for self-contained HTML emails, single-file web pages, and CSS background images that need to work without external assets.
  • For large images, Base64 encoding is not recommended — use standard image file links instead for better performance.

Frequently Asked Questions — Base64 Encoder/Decoder

Is the Base64 tool free?

Yes, completely free. No registration, no hidden charges, and no file size limits. All processing happens locally in your browser.

What is Base64 encoding?

Base64 is a binary-to-text encoding scheme that represents binary data (like images) as ASCII text. A Base64-encoded image can be embedded directly in HTML or CSS as a data URI, eliminating the need for a separate HTTP request.

How do I use the encoded Base64 string?

The tool generates a complete data URI (e.g., data:image/png;base64,...). You can paste this directly into HTML src attributes, CSS url() values, or JavaScript Image objects.

How do I decode a Base64 string?

Switch to the 'Base64 → Image' tab, paste your Base64 data URI or raw Base64 string, and click 'Decode & Preview'. The decoded image is displayed and available for download.

When should I use Base64 for images?

Base64 is best for small images (under 10KB), icons, sprites, and situations where minimizing HTTP requests is critical. For large images, standard file references are more efficient.

Does Base64 increase file size?

Yes, Base64 encoding increases the size by approximately 33% compared to the original binary file. This is the trade-off for the convenience of inline embedding.

What image formats are supported?

All image formats supported by your browser can be encoded to Base64, including JPEG, PNG, WebP, AVIF, GIF, BMP, SVG, and more.