utills.
中文
Base64 to image

Convert Base64 to an Image

Paste a Base64 string or a full data: URI, preview the image, and download it as a file — free and right in your browser.

Paste & previewAuto-detects formatNo sign-up PNG · JPG · WebP · GIF · SVG

Turning Base64 back into a file

Base64 strings show up everywhere — in CSS, in API responses, in saved data URIs, in config files. When you have one and need the actual image, this decoder converts it back: paste the string (with or without the data: prefix), and it rebuilds the original file so you can preview and save it.

The decoder is forgiving. It strips a data: URI prefix, removes line breaks and stray whitespace, handles URL-safe Base64, and repairs missing padding automatically. It then checks the decoded bytes really are an image, so a wrong or corrupt paste fails with a clear message instead of saving a broken file.

How to convert Base64 to an image

  1. Paste your Base64. Drop the raw Base64 body or a full data:image/…;base64,… URI into the box on the Decode tab.
  2. Decode. Click Decode — the image appears instantly in a preview, with its detected type and size.
  3. Download. Save the decoded image to your device; the file gets the correct extension automatically.

With or without the prefix

You can paste a full data:image/png;base64,… URI or just the part after the comma — the tool handles both. It even detects the real format from the bytes, so the download is correct even if the prefix was missing or wrong.

More Base64 & data URI tools

常见问题

What can I paste?

Either a complete data: URI (data:image/png;base64,…) or just the raw Base64 body. Line breaks, quotes, and url() wrappers are stripped automatically.

Why does it say the data isn't an image?

The string decoded successfully but the bytes aren't a recognised image format — usually a copy/paste that lost characters, or Base64 of something that isn't an image. Re-copy the full string and try again.

What format will the downloaded file be?

The decoder sniffs the real format from the data (PNG, JPG, GIF, WebP, BMP, SVG, AVIF, or ICO) and gives the download the matching extension.

Where is my image processed?

The encoding and decoding happen in your browser, so the result is created on your own device. How any data associated with the tool is handled is described in our privacy policy.

更多图片工具

Find your next tool

37 tools

Compress image Shrink file size while keeping quality. Resize image Change width and height to any size. Crop image Trim images to the exact frame you want. Convert image Switch between JPG, PNG, WebP and more. Remove background Erase the background in one click. Image to PDF Combine images into one PDF document. Rotate & Flip Turn, straighten, and mirror photos. Image to text Pull editable text out of any image. HEIC to JPG Open iPhone HEIC photos as JPG. Watermark Stamp text or logos over your images. Collage Arrange multiple photos into a grid. Favicon Generator Build favicons in every required size. Color Picker Grab hex colors and build palettes. Blur & Pixelate Obscure faces, plates, and private bits. Enhance Auto-fix brightness, contrast, and color. Passport Photo Prepare photos for ID and passport applications. Signature Clean up and extract handwritten signatures. Photo Effects Apply filters and vintage looks. Social Image Size covers for common social platforms. Add text to image Caption images and make memes fast. GIF Maker Turn frames or clips into animated GIFs. Border & Frame Add clean borders and photo frames. Mockup Drop screenshots into device frames. SVG Converter Trace raster images into scalable SVG. EXIF Viewer Inspect camera and GPS metadata. Poster & Print Lay out posters and print-ready sheets. Document Scanner Deskew and clean photographed documents. Image to Base64 Encode images into a data-URI string. Placeholder Make dummy placeholder images on demand. Image generator Make gradients, patterns, and avatars. Compare Images See two images side by side with a slider. QR Code Create and download QR codes. Hide Text in Image Embed a secret message inside a picture. Length converter Meters, feet, inches, miles and more. Weight converter Switch between kilograms, pounds and more. Temperature converter Celsius, Fahrenheit, Kelvin and more. Data storage converter Bits, bytes, megabytes and gigabytes.
Tab to move · Enter to open · Esc to close