Base64 to Image

Paste Base64 or upload a .txt file

Drag & drop a .txt file here (or paste into textarea)

Supports data URLs (data:image/...;base64,...) or raw base64. Small images recommended.

Image to Base64

Preview of the image being converted to Base64

Base64 Result

What is Base64 image encoding?

Base64 is a way to represent binary data, such as a PNG or JPG file, using only 64 printable text characters. An image encoded as Base64 can be embedded directly in HTML, CSS, JSON, email or source code as a data URL, for example data:image/png;base64,iVBORw0KGgo..., so no separate image file or HTTP request is needed.

This free Base64 to Image converter lets you decode those strings back into a viewable, downloadable image, and the Image to Base64 encoder turns any picture into a ready-to-use data URL.

How to convert Base64 to an image

  1. Paste your Base64 string into the Base64 input box, or upload / drag & drop a .txt file.
  2. Click Convert. The format (PNG, JPEG, GIF or WebP) is detected automatically.
  3. Preview the result, then Download it or open it in a new tab.

How to convert an image to Base64

  1. Click Choose image, drag & drop a file, or paste an image from your clipboard (Ctrl+V).
  2. The Base64 data URL is generated instantly in the result box.
  3. Click Copy Base64 or Download .txt to use it in your code.

Features

  • Two-way conversion: Base64 → image and image → Base64 on one page.
  • Auto format detection for PNG, JPG/JPEG, GIF and WebP, with a manual MIME override.
  • Private by design: everything runs locally in your browser — files are never uploaded.
  • Fast workflow: drag & drop, clipboard paste, one-click copy and download.
  • Free, no signup, works on desktop and mobile, with a dark mode.

Frequently asked questions

How do I convert Base64 to an image?

Paste your Base64 string (with or without the data:image/...;base64, prefix) into the input box or upload a .txt file, then click Convert. The image appears in the preview and you can download it.

How do I convert an image to Base64?

Choose an image, drag and drop it, or paste it from your clipboard into the Image to Base64 section. The Base64 data URL is generated instantly and can be copied or downloaded as a .txt file.

Which image formats are supported?

The tool auto-detects PNG, JPEG, GIF and WebP. If detection fails you can choose the MIME type manually. Any image format your browser can read can be encoded to Base64.

Are my images uploaded to a server?

No. All encoding and decoding happens locally in your browser using JavaScript, so your images and Base64 data never leave your device.

Why is my Base64 string invalid?

Common causes are a truncated string, extra characters copied by mistake, or a URL-safe Base64 variant. Make sure the whole string is copied and contains only A–Z, a–z, 0–9, +, / and = padding.

Our System