Skip to content
MagicDocTool

Base64 to Image

Paste a Base64 string or data URI to preview and download the image. The format is detected automatically from the data.

Runs in your browser — your data never leaves your device

Whitespace, line breaks and URL-safe Base64 are handled automatically.

Paste Base64 on the left to preview the image here.

How to use Base64 to Image

  1. 1

    Paste your Base64

    Paste a full data URI or just the raw Base64 string into the input box.

  2. 2

    Preview instantly

    The image type is detected automatically and previewed with its dimensions and size.

  3. 3

    Download the image

    Save the decoded image with the correct file extension in one click.

Frequently asked questions

Do I need the "data:image/…;base64," prefix?

No. Paste either a complete data URI or just the raw Base64 characters. When the prefix is missing, the format is detected from the file’s signature bytes.

Which image formats are detected?

PNG, JPEG, GIF, WebP, BMP, ICO and SVG are recognised automatically, and the download uses the correct file extension.

Why do I get an “invalid Base64” error?

Usually the string was cut off while copying, or it contains extra characters such as quotes or a trailing ")" from CSS. Copy only the part after "base64," and make sure nothing is missing at the end.

Is my data sent anywhere?

No. Decoding happens locally in your browser — the image is never uploaded.