You are offline. Tools you have opened before keep working.
PNG to Base64
Turn PNG icons, logos and screenshots into Base64 data URIs. Transparency is kept exactly, and the code is ready for CSS, HTML or JSON.
Free and private. Everything runs in your browser, nothing is uploaded.
PNG
Base64
Report a problem
How it works
Add your PNGOpen the file or drop it onto the input box. You can also paste Base64 directly.
Choose the outputPick data URI, Base64, CSS, HTML or Markdown. The preview and sizes update right away.
Copy or downloadCopy the code with one click, or download the image as a file.
Small PNG icons are a perfect fit
Icons and small UI images are where data URIs shine: they load together with the stylesheet and never show up late. Keep each one under a few kilobytes and your page stays fast.
If your PNG is large, try compressing it first with the image compressor and then come back to convert the smaller file.
About PNG
PNG is a lossless image format with transparency. It is the usual choice for icons, logos and screenshots, which also makes it the most common image inside data URIs.
About Base64
Base64 writes binary data as plain text using letters, digits, + and /. A data URI adds the file type in front, for example data:image/png;base64, so browsers know how to show it.
Frequently asked questions
Is the transparency kept?
Yes. The PNG file is encoded byte for byte, so transparency and colors are exactly the same.
Is my image uploaded?
No. The image is read and converted in your browser and never sent to our servers.
Is there a size limit?
There is no fixed limit, but data URIs over about 100 KB make pages and stylesheets heavy. For large images a normal image file is the better choice.
Can I convert other files, like PDFs or fonts?
Yes. Any file becomes a data URI or plain Base64. The CSS, HTML and Markdown options are only offered for images.
How do I turn Base64 back into an image?
Paste the Base64 text or data URI into the input box. The image is shown right away and Download saves it with the right file extension.
Does it work offline?
Yes. After you open the page once, it keeps working without an internet connection.