Base64 Image Encoder / Decoder

Turn an image into Base64 text for HTML, CSS or JSON, or decode a Base64 string back into an image file.

Free No signup Files stay on your device
Choose an image JPG, PNG, GIF, WebP or SVG
Ad space (shows only on your local machine)

How to use Base64 Image Encoder / Decoder

  1. To encode, select an image. To decode, paste Base64 text.
  2. Choose whether to include the data URL prefix.
  3. Copy the text, or download the decoded image.

About Base64 Image Encoder / Decoder

Base64 Image Encoder / Decoder converts an image into Base64 text and turns Base64 text back into an image file. It detects PNG, JPG, GIF, WebP and SVG automatically.

Developers use it to embed small icons in CSS, to test APIs that send images as text and to check what a data URI contains.

Base64 image encoding: a quick note

Base64 text is about one third larger than the original file, so it suits small images such as icons and logos. For large photos a normal image file loads faster. To make a picture smaller before you encode it, use the image compressor.

Frequently asked questions

How do I do Base64 encoding of an image?

Open the Image to Base64 tab and select the image. The Base64 text appears at once. Copy it with or without the data URL prefix.

How do I use the Base64 image decoder?

Open the Base64 to Image tab, paste your Base64 string and press Decode image. You see the picture and can download it. Data URLs that start with data:image also work.

What is Base64 used for?

It lets you place a small image directly inside HTML, CSS or JSON as text, so no extra file request is needed.

Which image types are supported?

PNG, JPG, GIF, WebP and SVG are detected automatically.

Is my image uploaded?

No. Everything happens in your browser.

Is this tool free?

Base64 Image Encoder / Decoder is free to use. There is no signup and no watermark.

Are my files safe?

Everything runs inside your browser, so your files stay on your device and are never uploaded.

Last updated: ยท How we write and test

Share your feedback

Tell us what you think, or what tool we should build next. We read every message.

What do you want to send?
How would you rate Prestofiles? (optional)
0 / 2000