Base64 Image Viewer
Base64 image decoding converts ASCII text back to binary image data. Paste a data URL (data:image/png;base64,...) or raw Base64 string to preview the image. Base64 encoding increases file size by ~33%. Supported formats: PNG (magic bytes 89504E47), JPEG (FFD8FF), GIF (47494638), WebP, SVG, BMP. Use for debugging embedded images in APIs, emails, and CSS.
Decode and preview Base64-encoded images instantly. Paste a data URL or raw Base64 string to see the image, dimensions, file size, and MIME type. Download the decoded image or copy HTML/CSS snippets. Supports PNG, JPEG, GIF, WebP, SVG, and BMP.
Base64 Input
Supported Image Formats
| Format | MIME Type | Magic Bytes |
|---|---|---|
| PNG | image/png | 89 50 4E 47 |
| JPEG | image/jpeg | FF D8 FF |
| GIF | image/gif | 47 49 46 38 |
| WebP | image/webp | 52 49 46 46 |
| SVG | image/svg+xml | 3C 73 76 67 |
| BMP | image/bmp | 42 4D |
How to Use
- 1
Paste Base64 data
Paste a data URL (data:image/png;base64,...) or raw Base64 string into the input area, or click a preset to see an example
- 2
Preview the image
The decoded image appears with a checkerboard background for transparency. Image dimensions, file size, and MIME type are shown above
- 3
Download or copy
Click Download Image to save the file, or use the copy button to copy the data URL to your clipboard
- 4
Use the snippets
Copy the ready-made HTML img tag or CSS background-image snippet to embed the image in your code
Frequently Asked Questions
- How do I view a Base64-encoded image?
- Paste the Base64 string into the input area. You can paste a full data URL (data:image/png;base64,...) or just the raw Base64 data. The tool auto-detects the image format from magic bytes and displays a preview with dimensions, file size, and MIME type.
- What image formats are supported?
- The viewer supports PNG, JPEG, GIF, WebP, SVG, and BMP formats. It detects the format automatically from the data URL prefix or by reading the magic bytes at the start of the decoded data. PNG starts with 89504E47, JPEG with FFD8FF, GIF with 47494638.
- Can I download the decoded image?
- Yes. Click the "Download Image" button to save the decoded image file. The file extension is determined from the detected MIME type: .png for image/png, .jpg for image/jpeg, .gif for image/gif, .webp for image/webp, .svg for image/svg+xml.
- What is the difference between Base64 and a data URL?
- Base64 is an encoding that represents binary data as ASCII text. A data URL is a URI scheme (data:image/png;base64,...) that embeds the Base64-encoded data directly in HTML or CSS. The data URL includes the MIME type, while raw Base64 does not. This tool accepts both formats.
- Why would I need to decode a Base64 image?
- Common use cases: inspecting Base64 images in API responses, debugging embedded images in HTML emails, previewing data URLs from CSS, checking image quality before deployment, and extracting images from JSON payloads. Developers often encounter Base64 images when working with APIs, CMS outputs, and email templates.
- How large can a Base64 image be?
- Base64 encoding increases file size by approximately 33% (every 3 bytes become 4 characters). The tool can handle images up to several megabytes, limited only by your browser memory. For reference, a 1 MB image becomes ~1.33 MB in Base64. Images over 100 KB are generally better served as separate files rather than inline Base64.