Skip to content

Base64 Image Decoder

Decode a base64 image, including a data URL, into a downloadable file. The page does not keep the file.

Result

Paste base64

How to Use

  1. 1 Paste the base64 or data URL.
  2. 2 The page removes a data URL prefix when one is present.
  3. 3 Download the decoded image.

Example Output

  • A PNG data URL downloads as decoded.png.

About This Tool

The text must decode to a PNG, JPG, GIF, WebP, BMP, or AVIF under 5 MB.

Using the Base64 Image Decoder

Base64 Image Decoder turns pasted base64, including a data URL, into a downloadable image. The field is labeled Base64 image. It is a textarea with eight rows, and it starts empty. There is no default string and no default format to quote before you paste. Choose Decode the image. On a successful run the label above the headline reads Format. A 2 by 1 PNG data URL has the headline PNG. The sentence is The base64 decoded to a 2 by 1 png image. The file is not stored. Download decoded.png.

The about line says the text must decode to a PNG, JPG, GIF, WebP, BMP, or AVIF under 5 MB. The steps say to paste the base64 or data URL, remove a data URL prefix when one is present, and download the decoded image. A data:image prefix is stripped before decode. Whitespace in the paste is removed. The Pixels line shows width by height. The Format line shows the lowercase extension. The file is not stored.

Before you choose Decode the image, the headline reads Paste base64 and the label reads Result. An empty paste or text longer than about seven megabytes of base64 characters is refused with Paste a base64 image under 5 MB. Bytes that are not valid base64, or base64 that does not decode to a readable image, is refused with Paste valid base64 for a PNG, JPG, GIF, WebP, BMP, or AVIF image. Reset clears the textarea and returns the headline to Paste base64.

The textarea accepts raw base64 or a full data URL on one paste. The field is labeled base64 image. It is a file field, and it starts with no file. There is no default image and no default byte count to quote before you choose one. Choose Decode the image. On a successful run the label above the headline reads Output. The headline is PNG. The sentence starts with The base64 is now a PNG of and ends with The file is not stored. Between those parts it names the byte count of that PNG for that request and says Download decoded.png.

The about line says the file must be an base64, and the PNG is offered as a download named decoded.png. The download button reads Download decoded.png. The file name is decoded.png. The Bytes line repeats the same count that appears in the sentence. The steps under the result say the base64 is decoded, a PNG is encoded at quality 90, and the file is not stored. The page uses the image bytes on this request and does not keep the file. This machine can decode base64, yet a refusal can still appear when the bytes are not base64, when the upload is missing or over 5 MB, or when encoding does not return a PNG.

A successful decode names the download decoded plus the detected extension. The Format headline uses uppercase letters. The sentence uses lowercase for the format word inside the pixel phrase.

What the Headline PNG Measures

The headline is the detected format in uppercase on a successful decode. For a 2 by 1 PNG data URL the headline is PNG. The label reads Format. The headline is not the pixel size. Width and height sit in the sentence and on the Pixels line. The sentence is The base64 decoded to a 2 by 1 png image. The file is not stored. The Pixels line reads 2 by 1 for that sample.

The download name is decoded plus the lowercase format extension. For PNG it is decoded.png. The download button label includes that filename. Copy result copies the sentence, not the image bytes. The Format line repeats the lowercase extension. The steps list prefix removal, decode, and that the file is not stored.

How Base64 Becomes decoded.png

The page reads the textarea as trimmed text. A data:image prefix matching image types is removed with a regular expression before whitespace is stripped. A missing paste stops at Paste a base64 image under 5 MB. Paste longer than seven megabytes of characters uses the same message. Valid base64 decodes to bytes. Those bytes must pass imagecreatefromstring.

Interest on a principal is a different product. The Simple Interest Calculator multiplies principal by an annual percent and by years. A principal of 1000 at 5 percent for 2 years earns interest of 100 and a total of 1100. The headline there is the interest. That page does not decode base64. Use it when the sample principal of 1000 should earn interest of 100. Use this page when a 2 by 1 PNG data URL should return the headline PNG and downloaded decoded.png.

What the Decoder Does Not Keep

The page does not keep the paste or the decoded file. The sentence ends with The file is not stored. Reset clears the textarea. The headline returns to Paste base64, and the label returns to Result. The sentence, Pixels line, and Format line are cleared. Paste again when you want another decode. A new sentence will name a new size and format.

From a Data URL to decoded.png

Open the page with an empty textarea. The headline reads Paste base64. Choose Decode the image without text. The headline is Paste a base64 image under 5 MB. Paste text that is not base64. The headline is Paste valid base64 for a PNG, JPG, GIF, WebP, BMP, or AVIF image. Paste a 2 by 1 PNG data URL and choose Decode the image. The headline is PNG. The label reads Format. The sentence is The base64 decoded to a 2 by 1 png image. The file is not stored.

A compounded amount is a different figure. The Compound Interest Calculator compounds a principal at an annual percent. A principal of 1000 at 5 percent, compounded 1 times a year for 1 years, is 1050. The interest line there is 50. The headline there is the amount. That page does not decode base64. Use it when the sample principal of 1000 should become 1050. Use this page when the download you need is decoded.png for the 2 by 1 PNG sample.

Pastes That Never Decode

A common miss is to expect PNG before anything is pasted. The waiting headline is Paste base64. Another miss is to read the headline as pixel size. The size is in the sentence and on the Pixels line. Another miss is to assume every download is decoded.png. Only a PNG decode uses that name. Another miss is to expect the paste to remain after reset.

A comparison that does not pick a base is a different percent. The Percentage Difference Calculator uses the absolute difference divided by the average of the absolute values, times 100. The absolute difference of 40 and 50 is 10. The average of the absolute values is 45. The percentage difference is 22.22. That page does not decode base64. Use it when you are comparing 40 and 50. Use this page when the headline you need is PNG for the 2 by 1 sample.

Keeping the Sentence and decoded.png

Copy the sentence and download the file before you reset. For the PNG sample the sentence is The base64 decoded to a 2 by 1 png image. The file is not stored. The headline is PNG. The Pixels line is 2 by 1. A note that says only PNG can be any successful decode. The sentence distinguishes runs.

A margin from revenue and cost is a different percent. The Profit Margin Calculator subtracts cost from revenue and divides that profit by revenue. Revenue of 200 and cost of 150 give profit of 50 and a margin of 25 percent. The headline there is the margin percent. That page does not decode base64. Use it when the inputs are revenue and cost and the sample margin is 25 percent. Use this page when the record you need is decoded.png and the sentence from the 2 by 1 PNG run.

An Image From the Paste You Chose

The headline answers which format decoded from the paste. For the 2 by 1 PNG data URL the answer is PNG. The label reads Format. The sentence names pixels and format and ends with The file is not stored. The download is decoded.png for that run.

Checking the Paste and the Sentence

Start with an empty textarea and confirm Paste base64. Submit empty and confirm Paste a base64 image under 5 MB. Paste invalid text and confirm Paste valid base64 for a PNG, JPG, GIF, WebP, BMP, or AVIF image. Paste a 2 by 1 PNG data URL and confirm headline PNG, label Format, and the sentence The base64 decoded to a 2 by 1 png image. The file is not stored. Confirm Pixels 2 by 1 and download decoded.png.

A sale price after one discount percent is a different reduction. The Discount Calculator multiplies a price by one percent and subtracts. A price of 80 at 25 percent is a discount of 20 and a sale price of 60. The headline there is the sale price. That page does not decode base64. Use it when the sample price of 80 at 25 percent should return a sale price of 60. Use this page when the download you need is decoded.png from the PNG data URL sample.

Frequently Asked Questions

What does a 2 by 1 PNG data URL return?

The headline is PNG. The label reads Format. The sentence is The base64 decoded to a 2 by 1 png image. The file is not stored. The Pixels line is 2 by 1. The download is decoded.png. The page does not store decoded bytes after the response finishes. Reset clears the textarea when you want a clean paste field.

Is data:image stripped?

Yes. A data:image slash format semicolon base64 comma prefix is removed before decode. The remaining characters are treated as base64. The page does not store decoded bytes after the response finishes. Reset clears the textarea when you want a clean paste field.

What refusal appears on an empty paste?

Paste a base64 image under 5 MB. The same message covers text that is too long before decode. The page does not store decoded bytes after the response finishes. Reset clears the textarea when you want a clean paste field.

What refusal appears on invalid base64?

Paste valid base64 for a PNG, JPG, GIF, WebP, BMP, or AVIF image. That covers non-base64 text and base64 that does not open as an image. The page does not store decoded bytes after the response finishes. Reset clears the textarea when you want a clean paste field.

What is the download name for PNG?

decoded.png. The download button uses the filename. A JPG decode would be decoded.jpg. The headline is the format in uppercase. The page does not store decoded bytes after the response finishes. Reset clears the textarea when you want a clean paste field.

Does the page store the image?

No. The file is not stored. The sentence says so. Reset clears the textarea. Paste again for another decode. The page does not store decoded bytes after the response finishes. Reset clears the textarea when you want a clean paste field.

What does Copy result copy?

The sentence with pixel size and format. Copy before reset. The download button saves the decoded file. The page does not store decoded bytes after the response finishes. Reset clears the textarea when you want a clean paste field.

What is the waiting headline?

Paste base64. The button says Decode the image. No format headline appears until a successful decode. The page does not store decoded bytes after the response finishes. Reset clears the textarea when you want a clean paste field.