Image Tools

Image to Base64 and Base64 to Image

Turn an image into a data URI and raw Base64 text, or paste Base64 to get the picture back. The file type is detected from its bytes and nothing is uploaded.

Drop an image here or

Up to 25 MB per file, 8000 px per side. Your files never leave your device: everything runs in this browser tab.


Image to Base64 and Base64 to Image

Base64 turns binary data into plain text, so an image can be placed straight into HTML, CSS or JSON as a data URI. In encode mode this tool reads your picture and gives you both the full data URI and the bare Base64 string.

In decode mode, paste a data URI or Base64 text and the picture is rebuilt for preview and download. The file type is detected from the first bytes of the data, not from the text before the comma. Only PNG, JPEG, GIF, WebP, AVIF, ICO and BMP are accepted, and anything else is refused. Your files are processed in your browser and never uploaded.

Key features

How to use

  1. Choose a mode.
  2. Add an image to encode, or paste Base64 to decode.
  3. Press the button, then copy the text or download the picture.

Use cases

Related tools

Frequently Asked Questions (FAQ)

Base64 uses four characters for every three bytes, so the text is about one third larger than the image.

Very long text is slow to display and hard to paste. Larger images are better kept as files.

Either it is not valid Base64, or the decoded bytes do not start with the signature of a supported image type. SVG and other formats are not accepted here.

No. Encoding and decoding happen in your browser.

25 MB per file for decoded images, and 6 MB when encoding to text.