Skip to content

Frequently asked questions

Everything you need to know about base64 image encoding

Last updated: April 2026

No matching questions found. Try different keywords.

Basics

Base64 is a binary-to-text encoding scheme that converts binary data (like images) into a string of ASCII characters. This allows you to embed images directly in HTML, CSS, or JSON without needing a separate image file.

Instead of referencing an external file, you embed the entire image as a data URI. For a detailed guide, see our tutorial.

Base64 encoding increases file size by approximately 33%. This is because base64 represents 3 bytes of binary data as 4 ASCII characters.

For example, a 100 KB image becomes roughly 133 KB as a base64 string. Despite this overhead, base64 eliminates a separate HTTP request, which can improve perceived load time for small images (under 10 KB).

Tip: Enable the "Optimize" option before encoding to reduce the output size.

Use base64 when:

  • Images are small (under 10 KB) — icons, logos, buttons
  • Creating email signatures or newsletters
  • Building single-file demos or prototypes
  • Reducing HTTP requests for above-the-fold content

Avoid base64 when:

  • Images are large (photos, banners over 50 KB)
  • The same image is used on multiple pages (caching is better)
  • You need responsive images with multiple resolutions

See our tutorial for a complete guide with code examples.

Yes. Base64 encoding is fully reversible. You can decode any base64 string back to the original image without any quality loss.

Most programming languages have built-in decode functions: JavaScript atob(), PHP base64_decode(), Python base64.b64decode().

Formats & Limits

We support all common image formats:

JPEG/JPG — photos and complex images
PNG — logos, icons, transparency
GIF — simple animations
WebP — modern format, excellent compression
SVG — vector graphics and icons
BMP — uncompressed bitmaps
ICO — favicons
TIFF/TIF — print and photography
AVIF — next-gen, best compression
HEIC/HEIF — Apple's default photo format

All formats can be optimized and converted before encoding.

Three reasons:

  • Server resources — this service is free and runs on limited infrastructure
  • Browser limits — very large base64 strings can cause display issues
  • Practical use — 99.9% of uploads are under 100 KB

Need larger files? Our API supports files up to 5 MB. Note that having an API account does not increase the web upload limit. Larger files can only be uploaded through the programming interface (REST API).

You can upload up to 20 files at once using drag & drop or the file picker. Each file is processed individually and you get separate base64 output for each.

The optimize option compresses your image before encoding to base64. This reduces the final base64 string size without significant visual quality loss. It works with JPEG, PNG, GIF, WebP, and AVIF formats.

Yes. Use the resize option on the home page to set a maximum width or height. The image is scaled proportionally before encoding. You can also convert between formats (e.g., PNG to WebP) at the same time.

Privacy & Security

No. Your images are deleted immediately after encoding. The process is: upload → encode to base64 → delete. We don't store filenames, EXIF data, geo-location, or any personal information.

The only anonymous data logged for statistics is file size, browser type, and anonymized IP address.

Base64 is an encoding, not encryption. Anyone can decode a base64 string back to the original image. Think of it as a different representation, not a protection mechanism.

However, using base64-image.de is secure:

  • All uploads happen over HTTPS
  • Images are deleted immediately after encoding
  • No personal data is stored
  • No third parties have access to your images

Yes. We are a German company (Geek Cell GmbH) and take data protection seriously. Images are processed in memory and deleted immediately. We use self-hosted fonts, consent management, and store no personal data from image processing. See our privacy policy for details.

Usage & Integration

Click "copy image" after encoding, then paste the data URI directly into your HTML img tag's src attribute. The format looks like this:

<img src="data:image/png;base64,iVBORw0K..." alt="My image">

See our tutorial for complete code examples.

Click "copy CSS" after encoding, then paste it into your stylesheet. The format is:

background-image: url('data:image/png;base64,iVBORw0K...');

This works great for small textures, patterns, and icons. See our tutorial for more examples.

Embed base64 images in HTML emails using data URIs in img tags. This avoids broken image links and the "show images" prompt in many clients.

Tips for email compatibility:

  • Use JPEG or PNG format (avoid WebP)
  • Keep images under 50 KB
  • Always include width and height attributes
  • Outlook has limited support — test with your audience

Gmail, Apple Mail, and most modern clients support embedded base64 images.

All modern browsers support base64 images via data URIs — Chrome, Firefox, Safari, Edge, and Opera. Support has been universal since Internet Explorer 8 (2009).

Base64 images work in HTML img tags, CSS background-image properties, inline SVG, and JavaScript Image() objects.

Yes! The Base64 Image API lets you convert images programmatically. It supports single and batch encoding with files up to 5 MB. Free tier included — create an account to get started.

See the API documentation for endpoints and code examples.

The web tool is 100% free with no limits on usage. No account required.

The API includes a free tier with 1,000 tokens. Additional token packs are available for purchase if you need higher volume. See our donation page if you'd like to support the project.