Convertor

Images converter

Image to Base64

Encode an image as a Base64 data URL, raw Base64, or a ready-to-paste CSS / HTML snippet.

Runs in your browser
PNG, JPG, JPEG, WEBP, GIF, SVG, BMP, AVIFTXT100% local · no upload

Drop your png here, or browse

Up to 50 MB · .png, .jpg, .jpeg, .webp, .gif, .svg, .bmp, .avif

Runs 100% in your browser — your file is never uploaded.

Guide

How to convert image to base64

  1. Choose an image

    PNG, JPG, WebP, GIF, SVG, BMP or AVIF up to 50 MB.

  2. Pick an output format

    Data URL for direct use, raw Base64 for an API, or a ready-made CSS / HTML snippet.

  3. Copy the text

    Paste the snippet into your stylesheet or markup — no extra request needed.

Format details

Input formats
PNG, JPG, JPEG, WEBP, GIF, SVG, BMP, AVIF
Output format
TXT
Privacy
No upload · processed locally

Frequently asked questions

When should I inline an image?

Small icons and logos (< 5 KB) benefit: inlining removes an HTTP request. Larger images are better served as files because Base64 inflates size by ~33%.

Does Base64 compress the image?

No — it re-encodes the same bytes as text, so the payload grows by about a third. Compress the image first.

Is the file uploaded?

No — encoding runs locally in your browser, which matters for private images.

Keep converting

View all →