Base64 to Image

How to use

Decodes a Base64 data URL or raw Base64 string back into a viewable image, with a download button for the result. Paste your Base64 string to preview and save the image.

Image ToolsLocal only
When to use this
  • Recovering a viewable image from a Base64 string returned by an API response during debugging
  • Extracting an embedded image from source code or a saved HTML file to save it as a standalone file
  • Turning a Base64 string from an email attachment or export into a downloadable PNG or JPG
  • Verifying that a Base64 payload your application generated actually renders as a valid image

Free and private. Everything runs on your own device, with no account and no uploads.

When you have a Base64 data URL string from an API response, a saved email attachment, or exported code and need to actually view or save it as a real image file, this tool decodes the string back into a downloadable PNG, JPG, or other image format. Developers debugging API responses and anyone recovering an embedded image from source code use it regularly. Decoding happens locally in the browser, so pasted data never leaves your device.

The tool accepts full data URLs with the prefix; if you paste raw Base64 without a prefix it will attempt to detect the image type, but including the prefix gives the most reliable results.

An error is shown if the string cannot be decoded into a valid image, usually meaning it was truncated or corrupted.

PNG, JPG, WebP, and GIF data URLs are all supported.

Yes, though extremely long strings may take a brief moment to render depending on your device.

How it works
  1. 1

    Paste the Base64 string

    Paste a data URL or raw Base64 string into the input field.

  2. 2

    Preview the decoded image

    The tool renders the decoded image automatically if the string is valid.

  3. 3

    Download the file

    Save the decoded image to your device.

Pro tips
  • ·Include the "data:image/..." prefix when pasting for the most reliable format detection
  • ·If decoding fails, check the string wasn't truncated when copied, a cut-off Base64 string cannot be decoded into a valid image
  • ·Strip any surrounding quotes or whitespace from a string copied out of JSON before pasting it in