What is Base64 to Image?
Base64 to Image validates a complete image Data URL or raw Base64 with a manually selected MIME type, calculates decoded bytes, creates a preview, and offers a download. It is useful for image fields found in APIs and logs, but it cannot repair damaged data or reliably infer a true image format from characters alone. Common workflows include the following. Preview a Base64 image stored in an API response or database field. Restore a valid Data URL as a locally downloadable file. Check the MIME choice, decoded size, and browser compatibility of raw Base64. The page also documents input boundaries, output behavior, and practical cautions so you can review the result before putting it into an application, configuration, test, or production workflow.
When to use it
- Preview a Base64 image stored in an API response or database field.
- Restore a valid Data URL as a locally downloadable file.
- Check the MIME choice, decoded size, and browser compatibility of raw Base64.
How to use it
- Paste a complete Data URL or raw Base64.
- Choose the correct MIME type for raw input.
- Decode, preview, and download if needed.
- Load one of the realistic examples first to verify the selected options and processing direction before replacing it with your own data.
- Review the output, status message, and documented limits; copy, download, or continue only after the result matches your expectation.
Runnable examples
The “Example 1” and “Example 2” buttons load the matching inputs. They cover different structures, directions, or boundaries and can be run directly in the workspace.
Example 1
data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMjAiIGhlaWdodD0iMTgwIj48cmVjdCB3aWR0aD0iMzIwIiBoZWlnaHQ9IjE4MCIgcng9IjI0IiBmaWxsPSIjMTAyNDNlIi8+PHRleHQgeD0iMTYwIiB5PSIxMDAiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZvbnQtc2l6ZT0iMzIiIGZpbGw9IiM3NGRmYzkiPkpTT05MYW5lPC90ZXh0Pjwvc3ZnPg==Example 2
PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MDAiIGhlaWdodD0iMjAwIj48cmVjdCB3aWR0aD0iNDAwIiBoZWlnaHQ9IjIwMCIgZmlsbD0iIzE4MzM0MiIvPjxjaXJjbGUgY3g9IjMyMCIgY3k9IjEwMCIgcj0iNzAiIGZpbGw9IiMyNmI2YTQiLz48dGV4dCB4PSIzMCIgeT0iMTEwIiBmb250LXNpemU9IjI0IiBmaWxsPSIjZjNmOGZhIj7mnKzlnLDlpITnkIY8L3RleHQ+PC9zdmc+Input rules
- Input may be a full data:image/...;base64 URL or standard Base64 without a prefix.
- Raw Base64 requires a MIME type that matches the actual bytes.
- Characters, padding, and the 10 MiB decoded-size limit are validated.
- Text input is counted before processing and is limited to 15,000,000 characters on this page; file modes apply the separate file limit shown in the workspace.
- Decoded output is limited to 10 MiB.
Output rules
- Output reports the selected MIME type and decoded byte count.
- Preview loads from a local Data URL; a failure does not repair or rewrite source bytes.
- The download extension follows the MIME choice and cannot prove the underlying content matches it.
- Output reflects only the current input, direction, and options; rerun after changing a mode or value instead of treating an earlier result as current.
- The tool cannot repair corrupted image bytes.
Limitations and cautions
- Decoded output is limited to 10 MiB.
- The tool cannot repair corrupted image bytes.
- Untrusted SVG remains an untrusted downloaded file.
How your data is handled
Validation, byte counting, preview, and download preparation happen locally. Images are not sent to a server, and untrusted SVG should remain treated as untrusted content.