Image to Base64

Represent the exact bytes of a tiny PNG as a data URL.

Maximum upload file size: 5 MB

Use Remote URL
Upload from device

Represent the exact bytes of a tiny PNG as a data URL.

How to use

  1. Download the 2 × 1 PNG example and upload that saved file.
  2. Convert the file and copy the entire data URL, including its prefix.
  3. Compare it with the reference output, or decode the copy back to an image.

Worked example

InputInput · Download

Input

2 × 1 · PNG

Expected result

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAABCAIAAAB7QOjdAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAD0lEQVQImWN4ZmOjkfcMAAnBAtuPdGM6AAAAAElFTkSuQmCC

Check the result

The output should start with data:image/png;base64, and the decoded image should measure 2 × 1.

Continue with another guide

Cookie
We care about your data and would love to use cookies to improve your experience.

Learn how we use cookies