Base64 Image Encoder / Decoder

Convert images to Base64 and back

Encode an uploaded image into a Base64 data URL for inline embedding in HTML or CSS, or decode a Base64 string back into a viewable, downloadable image.

About the base64 image encoder / decoder

Base64 data URLs let you embed images directly inside HTML, CSS or JSON without a separate file request — useful for small icons, email templates, and self-contained documents. This tool converts an uploaded image into its Base64 data URL, and turns a Base64 string back into a previewable, downloadable image.

In encode mode, upload an image to get its full data:image/...;base64,...string, ready to paste into an <img src>. In decode mode, paste a data URL or raw Base64 string, pick the image format if it is raw, and preview or download the result.

How to use the base64 image encoder / decoder

  1. Pick a mode

    Choose Encode (image → Base64) or Decode (Base64 → image).

  2. Load input

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

  3. Copy or download

    Copy the Base64 string, or preview and download the decoded image.

Frequently asked questions

What is a Base64 data URL?
It is a string starting with data:image/...;base64, that contains the entire image encoded as text. You can use it directly as an img src or in CSS without hosting a separate file.
Can I decode raw Base64 without the data: prefix?
Yes. Paste the raw Base64 string, choose the image format (PNG, JPG or WebP), and the tool builds the data URL for you before previewing.
Is my image uploaded anywhere?
No. Encoding and decoding happen entirely in your browser. Your file and strings never leave your device.
Are there size limits?
Very large images produce very long Base64 strings that can slow some editors, but the tool itself has no hard limit — it processes whatever your browser can hold.

Other utilities