Media Tools

SVG to PNG/ICO Converter

Paste any SVG markup, preview it live, then export it as a clean PNG or a multi-resolution Windows ICO. Everything is rasterized locally in your browser — your SVG never leaves this page and nothing is uploaded.

PreviewWaiting for input
Paste SVG markup to see a live preview.
Export

PNG renders at a single square size. ICO packs 16 / 32 / 48 px frames into one file.

PNG size

How the SVG to PNG/ICO Converter works

How it works

The converter reads your SVG markup as plain text and renders it through the same rasterization pipeline a browser uses. The markup is wrapped in a Blob typed as image/svg+xml and turned into an object URL, which is then loaded into an in-memory HTMLImageElement. That step lets the browser parse the SVG and apply its viewBox, gradients, and transforms exactly as it would in an <img> tag. The decoded image is drawn onto a 2D canvas with drawImage, and the canvas is encoded to PNG with toBlob('image/png'). Before rasterizing, the tool forces an explicit width and height on the <svg> root so each export lands at a predictable pixel size.

For ICO output, the same SVG is rasterized at 16, 32, and 48 pixels, and the three PNG frames are packed into a single ICONDIR container. That container is a compact binary format: a 6-byte header (a reserved word, a type field set to 1 for icons, and the frame count), followed by 16-byte directory entries recording each frame's dimensions, 32-bit depth, byte length, and offset, with the raw PNG bytes appended afterward.

The page also scans the markup for inline <script> tags, javascript: URLs, and on* event handlers before export. Preview remains available, but exported files only rasterize static geometry — no script in an SVG ever executes.

Use cases

Developers reach for this tool to generate favicon.ico and PWA manifest icons from a single logo SVG; to turn an inline vector into a raster for documentation, email signatures, or CMS uploads; and to produce crisp multi-resolution icons for desktop applications without installing a graphics suite.

Troubleshooting

A blank or failed preview usually means malformed markup, a missing xmlns attribute, or references to external images, fonts, or stylesheets, which the isolated rasterizer cannot fetch — keep the SVG self-contained. If transparency appears lost, check that no background rectangle is drawn; ICO frames keep a 32-bit alpha channel. Extremely large SVGs with heavy paths can slow encoding or exhaust canvas memory, so reduce the export size or simplify paths. When the script-detection warning appears, exported PNGs and ICOs render only the static portion, so interactive or animated SVGs are flattened.

FAQ

Do I need an internet connection or an account to convert an SVG?
No. The conversion runs entirely in your browser. Your SVG is never uploaded, and no account or sign-in is required.
Why does my SVG preview as blank even though it opens in my editor?
The most common causes are a missing xmlns attribute, unclosed tags, or references to external images and fonts that the isolated rasterizer cannot fetch. Keep all shapes and gradients self-contained.
Does the exported PNG keep transparency?
Yes. The canvas encodes a full alpha channel, so transparent regions stay transparent. Just avoid painting an opaque background rectangle over the artwork.
What frame sizes are packed into the ICO file?
The ICO packs 16, 32, and 48 pixel frames, each stored as a 32-bit PNG, so the file works both as a standard favicon and as a Windows app icon.
Can it convert animated SVG or SVG with scripts?
No. Scripts and event handlers are detected and never executed, and only static geometry is rasterized, so CSS or SMIL animations are flattened into a single frame.