Base64 to image

Decoding Base64 back into an image isn't supported yet. The Base64 tool can encode an image to Base64 and decode Base64 that holds plain text.

Runs in your browser. Your file never leaves this device.

Loading the tool…

Turning a Base64 string back into an image

Developers often meet images as Base64 strings in API responses, database exports, logs or HTML source. Pasting the string here decodes it in your browser and shows the image, which you can then download as a normal file.

Both bare Base64 and full data URIs (data:image/png;base64,...) are accepted.

Tips

  • If decoding fails, check the string wasn't cut off when copied; Base64 length is always a multiple of 4.
  • Don't paste secrets or tokens. Decoding happens locally, but keep good habits.

What this tool does

Base64 is a way of writing any data, text or a file, using only plain letters, numbers and a few symbols. Developers use it to put small images straight into HTML or CSS, to pass data through systems that only handle text, and to read values found in API responses and config files.

This tool has three modes. Text to Base64 encodes whatever you type, including Hindi or other scripts, using standard Base64. Base64 to text decodes a Base64 string back into readable text. File to Base64 reads any file and gives you a complete data URI, starting with data: and the file type, ready to paste into an img tag or a CSS background. Images get a preview.

Decoding only works when the result is text. It can't turn Base64 back into an image or other file yet. It also doesn't accept URL-safe Base64, the variant that uses - and _, or a string that still has its data: prefix.

Nothing you type or choose leaves your device, and once the page has loaded the tool needs no internet connection.

People use it for

  • Embedding a small icon in HTML or CSS as a data URI
  • Reading a Base64 value from an API response or a config file
  • Encoding a username and password pair for a Basic Auth header while testing
  • Checking what a Base64 string in an email header or log actually says

How to use it

  1. Pick a mode

    Choose Text to Base64, Base64 to text, or File to Base64.

  2. Paste text or choose a file

    Type or paste into the box, or drop a file in File mode. The result appears below with its length in characters.

  3. Copy or save the result

    Copy the output with one click. In decode mode you can also save the decoded text as a .txt file.

What it works with

You give itYou get
Text (any language)Base64
Base64Text
Any fileData URI (Base64)