Convert image to base64 with just one click!(jpg, png, gif)

It works on all image-types including animated gifs! Just click on upload or drag'n'drop your files to this window.

What is the purpose of this tool?

To put it simply, this tool converts images to a Data URI - this is a base64 representation of the image. All converted images could be merged into one file which is served in a single HTTP request - thus reducing server-hits and faster availability of your site.

What are the advantages?

Among other reasons it is primarily to save HTTP requests. External requests are one of the main issues why pages take so long to load, and this makes it faster.

What are the disadvantages?

As expected, there are drawbacks to this approach. They are:

  • The size of the embedded code is 1/3 larger than the binary equivalent, however this can be reduced to 2-3% using gzip compression.
  • Internet Explorer 7 is not supported.
  • Internet Explorer 8 limits data URIs to a maximum lenght of 32KB.
  • Data URIs don't carry a filename like a normal file.
  • Data URIs need to be re-enconded and re-embedded every time a change is made to the image.


  • HTML inline:

    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO 9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" />
  • CSS background-image:

    div.reddot { background: white url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO 9TXL0Y4OHwAAAABJRU5ErkJggg==') no-repeat scroll left top; }