Image to Base64

Encode any image as a Base64 data URL for embedding in HTML, CSS or JSON — or paste a Base64 string / data URL and turn it back into a viewable, downloadable image. The mime type (PNG/JPEG/WebP/GIF) is detected automatically. Nothing is uploaded.

Loading…

Your files never leave your device. All processing happens on your device. No uploads, ever.

How to use Image to Base64

  1. 1

    Pick encode or decode

    Choose the direction you need.

  2. 2

    Upload or paste

    Upload an image to encode, or paste Base64 to decode.

  3. 3

    Copy or download

    Copy the data URL, or download the reconstructed image.

Encode image to Base64

Upload an image and get its data URL. Useful for embedding small images directly into code without a separate file request.

Decode Base64 to image

Paste a Base64 string or a data:image/... URL. The tool detects the format, previews the image and lets you download it.

Private by design

Encoding and decoding happen entirely in your browser. Your image never leaves your device.

Frequently asked questions

What is a Base64 data URL?

A data URL embeds an image directly in text using the prefix data:image/...;base64,... It can be used in HTML src, CSS url() or JSON without a separate file.

Do you detect the image format when decoding?

Yes. The PNG, JPEG, WebP and GIF formats are recognised automatically from the file signature, or read from the data URL prefix if present.

Is my image uploaded anywhere?

No. The conversion happens entirely in your browser; the image never leaves your device.

Category: Images

Related tools

Last updated 7 August 2026