Skip to main content
PulsarKit

Convert SVG to PNG

Render SVG files to PNG at any scale or exact pixel size in your browser. Scripts and external links are stripped before anything is drawn.

Drop your files here

.svg · up to 10 MB

How to Convert to PNG

  1. 1

    Drop your SVG files

    Up to 100 files at once. Each one is checked to be real SVG markup before anything else happens.

  2. 2

    Set scale or exact size

    Multiply the drawing's own size by 0.5 to 10, or type the exact width you need and let the height follow the aspect ratio.

  3. 3

    Download the PNGs

    One file comes back as a PNG, several come back as a ZIP. The result card shows the pixel size you actually got.

Scale, not resampling

An SVG has no pixels; it has instructions for drawing shapes. That means a PNG rendered at 4× is not a blown-up small picture; every curve is drawn afresh at the larger size and the edges stay crisp. This tool takes advantage of that: before rendering, the width and height on the root element are rewritten to the pixel size you asked for, so the browser rasterises the vector paths straight into the target resolution instead of scaling a finished small bitmap up on a canvas. The default scale of 2 exists for the most common case, a logo drawn for an ordinary display that needs to survive a retina screen. Exact-pixel mode is there when a platform demands a specific number, such as a 1024×1024 app icon or a 1200×630 social preview.

Why scripts and external links are removed

SVG is XML, and XML can carry more than drawings. A file from someone else can contain a <script> element, event handler attributes like onload, a foreignObject holding a whole HTML document, or references to images and fonts on another server. Opening such a file carelessly would run someone else's code in your tab, or quietly tell a remote server that you opened it and when. Every file here goes through DOMPurify with the SVG profile first, then through a second pass of our own that strips every href, xlink:href and CSS url() that does not point at an anchor inside the same file or at an embedded data: URI. Fonts and images embedded as data: URIs are kept and render normally. Anything removed is counted, so you can tell why part of a drawing came out blank.

Transparency and background

PNG supports an alpha channel, so by default the areas your SVG does not paint stay transparent, which is what you want for a logo that will sit on a coloured header. If the destination cannot handle transparency, pick white or a custom colour and it is filled in before the drawing is placed on top, in one pass, with no halo around the edges.

Your file stays on your device

Reading, sanitising, rendering and PNG encoding all happen inside this browser tab. Nothing is uploaded and nothing is stored. The sanitising step is the reason it is safe to do this locally at all: by the time your SVG touches the page, it can no longer run code or reach the network.

Frequently asked questions

Why does my PNG look blurry at a high scale?

It should not, because the vector is re-rendered at the target size, not stretched. If it does look soft, the SVG probably contains an embedded bitmap (a data: URI image) rather than real vector paths; that bitmap has a fixed resolution and enlarging it cannot add detail. Check the source file in an editor to see whether the shapes are paths or a single embedded picture.

What happens to scripts inside my SVG?

They are removed before the file is rendered, along with event handler attributes such as onload and onclick, and any foreignObject block. Nothing from the file is ever executed. This is not optional or a setting; there is no code path here that renders an SVG without sanitising it first.

Why did the external images in my SVG not show up?

Any reference to http://, https:// or a protocol-relative // address is stripped, because fetching it would tell that server you opened the file. Only references to an id inside the same document and embedded data: URIs survive. If you need those pictures in the result, embed them into the SVG as data: URIs first, then convert.

How do I get an exact pixel size?

Switch the output size to "Exact pixels" and type the width. Leave the height at 0 and it is derived from the drawing's aspect ratio, so nothing gets squashed; type a height instead if you deliberately want to stretch to a fixed box. Both sides are capped at 16384 pixels, which is the limit of a browser canvas.

Is transparency preserved?

Yes, by default. Unpainted areas come out with alpha 0 in the PNG. Choose white or a custom colour under Background if you need a solid backdrop instead, since some older tools and email clients render transparent PNG areas as black.

What if my SVG has no viewBox?

Then the width and height attributes decide the intrinsic size. If those are missing too, the SVG specification's default of 300×150 is used, and scale is applied to that. This is the same size a browser would give the file, so the result matches what you would see opening the SVG directly.

How many files can I convert at once?

Up to 100, 10 MB each and 200 MB combined. They share one set of settings and are rendered one after another; a file that fails does not cancel the rest, and everything that succeeded comes back in a single ZIP.

Does the file get uploaded to a server?

No. Sanitising and rendering both run in your browser. There is no upload, no queue and no stored copy; closing the tab is all the cleanup there is.

Guides

Related tools