Convert an SVG file or pasted markup to PNG at 1×, 2×, 4× or an exact pixel width, with a transparent, white or custom background.
Your markup is parsed, painted and encoded inside your browser. Nothing is uploaded and nothing is stored.
Drop an .svg file here
SVG files · up to ~5 MB
An SVG file is a set of drawing instructions, not a grid of pixels. To get a PNG, this tool hands the markup to the browser's image decoder, which lays it out and paints it into a canvas at the size you ask for, and then encodes that canvas as PNG — all locally, with no libraries.
image/svg+xml and an object URL, loaded into an Image, and on load drawn onto a canvas sized to your target. The tool rewrites the root <svg> tag's width/height to that target size first, so the browser rasterizes at exactly the resolution you asked for instead of scaling a small bitmap up.width and height, those are the native 1× size. If it only declares a viewBox, the viewBox's own width and height supply both the aspect ratio and the base size — a common pattern for icon sets. If it declares neither, there is nothing reliable to measure, so the tool falls back to 512 px square and says so in the hint under the buttons.<img>, and browsers run SVG images in a restricted mode: external images, web fonts, remote CSS and scripts are not fetched, and <foreignObject> content is not painted. So a gradient defined inside your file survives, while an @imported font or a linked PNG does not. Inline data: URIs are safe because they carry no network request. Technically this is also why export can fail loudly: a canvas that received a cross-origin resource becomes tainted, and canvas.toBlob() refuses to read it back — that path is caught and reported instead of crashing.When an SVG is rasterized through an image element — which is exactly how a browser turns vector markup into pixels — it runs in a locked-down mode: it cannot load images, web fonts, stylesheets or scripts from outside itself, and foreignObject HTML is not rendered either. Anything your file pulls in by reference disappears. Self-contained markup (inline paths, inline gradients, text nodes with a generic font family, data: URIs for embedded images) rasterizes faithfully.
Use 2× or 4×. A 24 px icon rasterized at 2× gives a 48 px PNG that stays sharp on retina and high-DPI screens; 4× gives 96 px, which is enough for the largest launcher sizes. If you need an exact target like 512 px, type it in the custom width box — the height follows the file's own aspect ratio.
No — this direction is one-way. SVG to PNG throws away the vector description and keeps pixels, and there is no reliable way to recover curves, text and structure from a raster. Tracing tools exist, but they guess; this converter is a faithful rasterizer, not a tracer.
Yes. PNG has an alpha channel, so with the transparent option the exported file has no background layer at all — only the shapes you drew. Pick white or a custom colour when you need a solid plate, for example for JPEG-only destinations or slide decks.
No. Your markup is parsed with DOMParser, drawn to a canvas and encoded with canvas.toBlob, all locally. No request leaves the page, nothing is stored, and the tool works offline once the page is loaded.
If you just finished with SVG to PNG Converter, the natural next steps are Compress Image to Size, Passport Photo Maker, Meme Generator, or browse every tool in Privacy File Tools.