# Base64 to Image

Paste base64 or a data URL and the image appears, ready to save. The format is read from the bytes, not the label. Nothing you paste is uploaded.

Canonical page: https://filetity.com/base64-to-image

## Capabilities

- Free: Yes, with no watermark and no page limit.
- Account required: No. There is no account system.
- Processed on device: Yes. The file is read by your browser and never uploaded. There is no server to send it to.
- Formats: Base64 in, with or without a data: prefix, in the standard or URL-safe alphabet. PNG, JPG, GIF, WebP, AVIF, SVG, BMP and ICO recognised and saved.
- Limits: Held in memory, so a very large payload is limited by the browser rather than the tool. Base64 that decodes to something other than an image is refused with the reason.
- Mobile: Yes, on any modern mobile browser. Large files are limited by the memory the phone gives the browser.
- Offline: Yes, once the page has loaded. The tool keeps working with no network connection.

## Questions

### Do I need to include the data:image/png;base64, part?

No. Paste it with the prefix or without, whichever you happened to copy. The format is worked out from the decoded bytes either way, so a bare payload gets the same result as a full data URL and neither has to be tidied up first.

### Why does it say my base64 is not an image?

Because base64 carries anything, so a clean decode does not mean a picture. If the payload was a PDF, a font or a fragment of JSON, it decodes perfectly and is still not something to draw. The message says which case you are in rather than showing a broken image icon.

### It has line breaks in it. Does that matter?

No. Whitespace is not part of base64 and is stripped before decoding, so a payload copied out of a terminal, a JSON file or an email header works with its line wrapping intact. The URL-safe alphabet, with dashes and underscores instead of plus and slash, is accepted too.

### Is the picture uploaded anywhere to render it?

No. The bytes are turned into a local object in your browser and drawn from there, so nothing crosses the network. That matters because base64 images in code are frequently signatures, ID scans and screenshots of things that should not be pasted into a stranger's site.

### Why is the saved file a different type from what I expected?

Because the bytes disagreed with the label. A data URL saying image/png whose payload starts with the JPEG marker is saved as a .jpg, since the prefix was written by whatever produced the string and the bytes came from the file itself. Trusting the label would give you a .png that no image viewer will open.

## Related tools

- [Image to Base64](https://filetity.com/image-to-base64): Turn an image into base64 or a data URL for CSS, HTML or JSON.
- [Base64 decode and encode](https://filetity.com/base64-decode): Decode base64 to text, or encode text to base64, without leaving the page.
