Skip to content
PDFBoii

Image to Base64

Turn an image into a Base64 data URI you can paste into HTML, CSS or code.

Free, with no account needed. It runs in your browser, so your file never leaves your device.

Select image

or drop it here — JPG, PNG, WebP, GIF, BMP, TIFF or HEIC · up to 25 MB

About Image to Base64

Image to Base64 turns a picture into a data URI, a long line of text that starts with data:image. You can paste it straight into HTML, CSS or JSON instead of linking to a file.

Last reviewed

How to use it

  1. Select the image.
  2. Press Convert to Base64.
  3. Download the text file, or copy the data URI from it.

When to use it

Good to know

Tips for a better result

Questions about Image to Base64

How do I use the data URI in HTML?
Paste it as the src of an image tag: <img src="data:image/png;base64,...">. In CSS use it inside url().
Why is the Base64 text bigger than my image?
Base64 represents binary data using only text characters, which adds roughly one third to the size.
How much does Image to Base64 cost?
Image to Base64 is free, and you don't need an account. It runs inside your browser, so it costs us nothing to run and there are no credits to spend.
Is my file kept after I use Image to Base64?
Your file never leaves your device. Image to Base64 works inside your browser, so nothing is uploaded and there is nothing for us to keep.
Do I need an account to use Image to Base64?
No. Image to Base64 works without an account or sign-up. Open the page, choose your file and download the result.
Does Image to Base64 work on a phone?
Yes. Image to Base64 runs in the browser on phones, tablets and computers, with nothing to install. A very large file can be slow on an older phone, because your own device does the work.
Is there a file size limit for Image to Base64?
We set no upload limit, because nothing is uploaded: the limit is your device's memory. If your browser can't process a file, the page offers to process it on our servers instead. That uses credits and accepts files up to 25 MB.

Related tools