ToolChop

Base64 to Image Online

Paste any base64 string — with or without a data: prefix — and ToolChop decodes, previews, and downloads the original image. PNG, JPG, GIF, WebP, BMP, ICO, SVG.

Try:

How to decode a base64 image online

Paste your base64 into the input box. ToolChop strips any data:image/...;base64, prefix, normalizes URL-safe base64 (-/_+//), pads missing= characters, and decodes the result with the browser's built-in atob. The first few bytes are inspected to determine the actual format — PNG, JPG, GIF, WebP, BMP, ICO, or SVG.

Why a local base64 decoder matters

Base64 images are often screenshots of internal dashboards, employee photos, customer-supplied content, or generated assets embedded in private APIs. Uploading any of those to a third-party decoder is a needless leak. ToolChop runs the decoder entirely in your browser — your base64 and the resulting image never leave your device.

What you can do

Frequently asked questions

How do I decode a base64 string into an image online for free?

Paste your base64 into the textarea on this page — whether or not it has a data:image/...;base64, prefix. The decoded image appears immediately below the input with Download and Copy data URL buttons. No account, no upload, no daily limit.

Does ToolChop upload my base64 data?

No. Decoding runs entirely in your browser using the built-in atob function and a Blob. Your base64 string and the resulting image never leave your device — useful when the embedded image contains screenshots of internal dashboards, employee photos, or other content you should not push to a third-party server.

What image formats does it auto-detect?

PNG, JPEG/JPG, GIF (including animated), WebP, BMP, ICO, and SVG. Detection works from the decoded bytes' magic header — the first few bytes of every standard image format are unique. If you include a data:image/...;base64, prefix the MIME is taken from that, but the magic-byte check overrides it when they conflict (i.e., your data wins over a wrong prefix).

Why does my base64 fail to decode?

Three common causes. (1) Truncation: you copied only part of the string — base64 strings can be hundreds of KB long, so paste the entire thing. (2) Stray characters: line breaks, spaces, and quotes get stripped automatically, but emoji or HTML entities will fail. (3) Wrong alphabet: URL-safe base64 uses - and _ instead of + and / — ToolChop normalizes both forms automatically.

Can I decode base64 from data:image URLs in CSS or HTML?

Yes. Paste the whole url(data:image/png;base64,...) value, or just the inner data:image/png;base64,... — ToolChop strips both the url() wrapper and the data URL prefix. The same goes for HTML img src attributes.

What about URL-safe base64?

URL-safe base64 (RFC 4648 §5) replaces + with - and / with _ so the value can sit in a URL without escaping. ToolChop normalizes URL-safe characters back to standard base64 before decoding, so JWT-style strings or Firebase storage tokens work.

Does ToolChop add padding if my base64 string has none?

Yes. Standard base64 requires the encoded length to be a multiple of 4, padded with =. URL-safe encodings often drop the padding. ToolChop adds back the right number of = before decoding, so unpadded strings work fine.

Is there a size limit?

Only your browser's memory. Base64 inflates binary by ~33%, so a 10 MB image is roughly 14 MB of base64 text. Modern Chrome handles this without issue. For very large strings, the paste action is the slow part — pasting a 50 MB base64 string takes a second or two before decoding begins.

Can I decode a JSON-embedded base64 field?

Yes — just copy the value of the field (without the surrounding JSON quotes) and paste. ToolChop strips whitespace and newlines, so multi-line JSON values copy cleanly.

Why is the downloaded file size smaller than my base64 string?

Base64 encoding expands binary data by about 33% (4 base64 characters per 3 bytes). When you decode, you get back the original binary — so a 14 MB base64 string downloads as a ~10 MB image. This is normal and expected.

Does it work with SVG base64 strings?

Yes. SVG is text, but it is commonly base64-encoded for embedding in CSS. ToolChop detects SVG by looking for <svg or <?xml at the start of the decoded text, decodes it, and previews it as an image. Download produces a real .svg file.

Why use ToolChop instead of an online decoder that uploads my data?

Privacy and convenience. Many embedded base64 images come from screenshots, internal dashboards, customer photos, or generated assets that should not leave your machine. ToolChop runs entirely in your browser and is built to handle real-world messy input — URL-safe alphabets, missing padding, stray prefixes, and unknown MIMEs all just work.

Runs in your browser Free forever No signup required Files never uploaded
Advertisement

More free tools