⚡
usefultools.dev
B64

Base64 to Image Converter

NEW

Decode Base64 or data URL strings into an image, preview it and download the file.

Runs 100% in your browser — your input is never uploaded or stored on our servers.

Raw Base64 or a full data: URL — whitespace, URL-safe characters and missing padding are fine.
⚡

Quick Examples

Typical inputs and the results this tool produces.

PNG
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==
PNG, 1 × 1 px, 70 B
GIF
R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
GIF, 1 × 1 px, 42 B
Data URL
data:image/svg+xml;utf8,%3Csvg xmlns=…
SVG, 24 × 16 px, 69 B
No padding
The same PNG string without its trailing ==
PNG, 1 × 1 px, 70 B — missing padding added automatically
📖

Overview

A Base64 to image converter turns a long text string back into the picture it encodes. Base64 strings show up in CSS background rules, HTML img tags, JSON API responses, emails and database exports, and they are impossible to read until they are decoded into a real file.

Paste raw Base64 or a complete data: URL and the tool decodes it instantly in your browser. It tolerates line breaks, spaces, URL-safe characters and missing "=" padding, then checks the first bytes of the data to find the real image format — PNG, JPEG, GIF, WebP, BMP, SVG, ICO or AVIF — even when the data URL claims something else.

You get a live preview on a transparency checkerboard, the pixel dimensions and byte size, and a download button that saves the file with the correct extension. Nothing is uploaded; the decoding happens locally.

Why use this tool?

  • Detects the real image type from magic bytes
  • Accepts raw Base64 and full data URLs
  • Fixes whitespace, URL-safe characters and padding
  • Shows dimensions and exact byte size
  • Private: decoding never leaves your browser
⭐

Features

🔎

Format sniffing

Recognises PNG, JPEG, GIF, WebP, BMP, SVG, ICO and AVIF from the file header.

🧹

Forgiving parser

Strips whitespace and quotes, converts - and _ and restores missing padding.

🖼️

Live preview

Shows the decoded image on a checkerboard so transparency is visible.

📐

Size details

Displays pixel dimensions, MIME type and exact file size in bytes.

⬇️

Correct download

Saves the file with the right extension and a name you choose.

📋

Copy options

Copy the cleaned data URL or the bare Base64 string.

🛠️

How to Use

1

Paste the Base64

Paste a raw Base64 string or a full data: URL into the box, or load it from a text file.

2

Check the preview

The image appears immediately with its format, dimensions and size.

3

Name the file

Edit the file name if you want; the extension follows the detected format.

4

Download or copy

Press Download, or copy the cleaned data URL or Base64.

🤔

Frequently Asked Questions