Image Tools

Base64 to Image

Decode Base64 image strings and see the rendered image before you download it.

Best for: API payloads that embed avatars, HTML email and CMS snippets

Quick answer

Paste a Base64 image string or data URL to render the image immediately in your browser and download the decoded file.

Overview

This tool turns encoded image data into a normal image file you can inspect, reuse, or save. It accepts plain Base64 strings as well as full data URLs, so you can work with output copied from APIs, HTML attributes, or stored records without manually rewriting the data. After decoding, the image is shown as a preview so you can verify that the MIME type, content, and visual result match what you expect. If the string is incomplete, altered, or not actually image data, the preview will fail instead of producing a misleading file.

Use cases

  • API payloads that embed avatarsDecode user avatar data returned by a backend so you can inspect the exact image that will be stored or displayed.
  • HTML email and CMS snippetsRender inline image data copied from templates, email markup, or rich-text content before it is reused elsewhere.
  • Debugging broken image fieldsCheck whether an image field contains a valid data URL, a truncated Base64 string, or content that is not an image at all.
  • Extracting generated assetsTurn generated Base64 output from an app, script, or design export into a file you can open and share.

How it works

  1. 1

    Paste a Base64 string or a full data URL into the input box.

  2. 2

    The tool decodes the payload and attempts to build an image from it.

  3. 3

    Review the preview to confirm the format and visual content.

  4. 4

    Download the decoded image once the result looks correct.

Examples

Decode a PNG avatar

Input: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAAF0lEQVR42u3BAQ0AAADCIPunNscwYAAAAAAAAAB4G4xQAAaM9l7sAAAAASUVORK5CYII=

Output: PNG image preview, 64×64, ready to download.

Useful when a profile image is delivered as an inline data URL.

Open a Base64 logo from JSON

Input: iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABHklEQVR4nO2WsQ3CMBREz0o7qI4kYgM0wI4QK2gK6qgJ6mA5gQ0QK1gYt4dB8Nw0m3QkV3c9m5b5m0m8xWq2Qqf8r3xgQf5gM8j8x2YVQwQW2gQ9m9j0gk4m0m0j8kQ8G2jQ3C0g3Q0v5tqgYQ8A9m4QKQ0wYzQm3mS8n8v4wY8Q2wQw2wQw2wQw2wQw2wQw2wQw2wQw2wQw2wQw2wQw2wQw2wQw2wQw2wQw2wQw

Output: Image preview rendered from a truncated sample string.

Best for testing whether a Base64 field copied from JSON is complete and valid before saving it.

Check a CSS inline background image

Input: data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjEyOCIgaGVpZ2h0PSIxMjgiIGZpbGw9IiMwMDc4ZGYiLz48L3N2Zz4=

Output: SVG image preview showing a solid blue square.

Handy when a stylesheet or component stores art as an encoded data URL.

FAQ

What input format works best: plain Base64 or a data URL?

Both work. A full data URL is easier when the MIME type is included, while a plain Base64 string is fine if the image type is already known.

Why does a string sometimes decode but not display an image?

The data may be incomplete, corrupted, or the wrong MIME type. A valid Base64 string can still fail if the bytes do not represent a readable image.

Can I decode SVG as well as PNG or JPEG?

Yes, if the SVG is correctly encoded as a data URL or valid Base64 text. The image must still be well-formed SVG content.

What happens if the Base64 text includes line breaks or spaces?

Formatting characters can break some strings. Remove extra whitespace if the preview does not render as expected.

Why does the downloaded file not match the original name?

Base64 does not carry a file name by itself. The tool can decode the image content, but the final filename is determined when you download it.

Can a non-image Base64 string be forced into an image?

No. If the bytes are not image data, the preview will not become a usable picture. The tool does not invent or repair image content.