Base64 Encode/Decode

Encode images to Base64 strings or decode Base64 to images online for free. Useful for embedding images in HTML, CSS, or JSON without external files.

Drop an image here or click to browse

PNG, JPEG, WebP, GIF, BMP, SVG — up to 100MB

Common Use Cases

HTML Email Signatures — Inline Images

Base64 encodes images directly into HTML so email clients load them without external requests. Keep encoded images under 2KB — larger images bloat the email body and may trigger spam filters.

CSS Background Icons — Small Only

For tiny icons under 2KB, base64 in CSS eliminates an HTTP request. Above 2KB, external files are faster — browsers cache them between pages, and they do not inflate your stylesheet.

JSON API Payloads — Embed Images

When your API must return an image inline with other data, base64 encoding packs it into JSON without a separate image server. Only use for images under 10KB to keep API response times fast.

Debug Base64 Strings — Decode to Verify

Paste a base64 string to decode it back into an image. Useful for inspecting what an encoded data URI actually contains before embedding it in your code.

Related Tools

Frequently Asked Questions

What is Base64 encoding for images?

Base64 encoding converts binary image data into a text string of ASCII characters. This is useful for embedding images directly in HTML, CSS, or JSON files without needing external image files or additional HTTP requests.

When should I use Base64 images?

Base64 is ideal for small images like icons, logos, and sprites that are embedded in HTML or CSS. For larger images, Base64 increases file size by about 33% and slows down page loading — regular image files are better.

How do I use the decoded image?

After decoding a Base64 string, you can preview it in the browser and download it as a PNG file. You can also copy the data URL directly from the Base64 string to use in your code.

Is my image uploaded to a server?

No. All encoding and decoding happens entirely in your browser. Your images and Base64 data never leave your device.