Media

Image to Base64

Convert any image into a Base64 data URI, CSS rule, or HTML snippet, or decode Base64 back to an image.

Drop an image or paste Base64
Source No file loaded
Choose image or drop here
JPG, PNG, WebP, SVG, GIF, or ICO up to 50 MB
100% on-device. Files never upload.
Original image
Base64 Awaiting file

The Base64 string appears here

Decoded image
Settings Data URI
How It Works

How to Use Image to Base64 in 3 Steps

1

Load an image or string

Drop an image onto the left pane, or paste a Base64 string or data URI into the text box below.

2

Choose an output format

Open Settings to switch between a data URI, raw Base64, CSS background-image, HTML img tag, or Markdown.

3

Copy or download

Copy the generated Base64 snippet, save it as a .txt file, or download the decoded image.

FAQ

Image to Base64: Frequently Asked Questions

Is my image uploaded anywhere?

No. Your browser decodes and processes the image on an HTML5 canvas on your device. Nothing goes to a server.

Are original image bytes encoded without recompression?

Yes. The encoder converts exact file bytes into Base64 text, so decoding restores the identical binary file.

Why is Base64 larger than the original image?

Base64 represents every 3 bytes as 4 text characters, increasing size by about 33%. Inline only small icons under 10 KB.

Can I decode raw Base64 back into an image?

Yes. Paste a full data URI or raw Base64 string, and the tool detects PNG, JPG, GIF, WebP, or SVG headers.

Does Base64 encoding work with SVG files?

Yes. SVG files encode cleanly and output a standard image/svg+xml data URI.

Toolity Media

Explore All Media Tools

Compress, convert, resize, and edit image, video, GIF, and audio files locally in your browser.

Copied to clipboard