P0 · Browser-only tool

Base64 to Image Converter

Paste raw Base64 or a complete image data URL. The browser decodes it locally, checks the file signature, previews the image, and reports its real metadata.

Runs locally in your browser · No upload · No account

Image result

Preview the bytes, not a guessed filename

A Base64 value does not carry a trustworthy filename. This tool inspects the decoded byte signature for PNG, JPEG, GIF, WebP, BMP, ICO, and SVG before it creates the preview. The result shows the detected MIME type, extension, byte size, and natural pixel dimensions.

Raw payloads and full data:image/... URLs are both accepted. If a declared media type disagrees with the decoded signature, the detected bytes win. That makes the page useful for API responses, CSS data URLs, email source, and database fields where the original file name is missing.

Local image decoding and safe limits

Decoding, signature checks, preview creation, and downloading all happen in this browser tab. The value is not uploaded. Very large Base64 values can still consume substantial memory because both the encoded string and decoded bytes exist at the same time.

SVG is treated as an image format but can contain active or external references. Inspect unfamiliar SVG source before opening it outside a restricted image context. Base64 is transport encoding, not malware scanning or encryption.

Common failures this tool explains

  • The value mixes the standard (+ and /) and URL-safe (- and _) alphabets.
  • Padding was removed incorrectly, or the unpadded length has an impossible remainder of 1.
  • The decoded bytes are valid but do not match a supported image signature.
  • A data URL was copied without the comma between its metadata and payload.

Equivalent commands

Use the runtime or shell already available in your workflow. Validate untrusted input and keep binary output out of terminals when it may contain control bytes.

Python

from pathlib import Path
import base64
Path('image.bin').write_bytes(base64.b64decode(value, validate=True))

JavaScript

import { writeFileSync } from 'node:fs';
writeFileSync('image.bin', Buffer.from(value, 'base64'));

Shell

printf '%s' "$VALUE" | base64 --decode > image.bin

Standards and official references