OmniFeed Search

SVG to PNG converter

Convert SVG graphics to PNG at their own size or up to 4 times larger, with transparent areas kept transparent. The SVG is drawn again at the size you pick, so the PNG stays sharp instead of showing enlarged pixels. It runs in your browser; nothing you enter is uploaded.

For the reverse, use the PNG to SVG converter.

You can also drop images on this box. Your images never leave your browser: the site doesn't store them, and all the converting happens on your device.

Resize

Fill in one to keep the image's proportions. Fill in both to fit the image inside that size, still keeping its proportions.

How big the PNG comes out

An SVG describes shapes, not pixels, so the converter has to choose a pixel size. It starts from the width and height on the SVG's first <svg> tag, the size a browser shows the file at on its own. When those are missing or in percent, it uses the viewBox, and an SVG with none of them comes out 300 by 150 pixels, the same default browsers use. Sizes in other units count 96 pixels to the inch, so width="10cm" becomes 378 pixels.

The SVG size option multiplies that. An icon with viewBox="0 0 24 24" and no width or height comes out 24 by 24 pixels at its own size and 96 by 96 at 4 times. Phones and many laptops have screens that use two or three physical pixels for each pixel of a web page or app layout, so a PNG shown there at its own size looks soft; 2 or 3 times keeps it crisp.

Getting another size

For a size the SVG size option doesn't offer, such as a 512-pixel app icon from that 24-pixel SVG, open Resize and type 512 as the width; the height follows the SVG's proportions. To set the size in the SVG file itself instead, open it in a text editor and change the numbers in width and height on the <svg> tag, keeping their ratio. Then convert it at its own size. If the tag has no viewBox, first add one with the old width and height, such as viewBox="0 0 24 24"; without it, the drawing stays small in the corner of a larger, empty image.

Browsers cap how many pixels one image can have. iPhones refuse anything above about 16.7 million, such as 4096 by 4096, and the page then shows an error for that file. Computers usually allow much more.

Fonts, linked images and styles

Browsers draw an SVG opened as an image without loading anything from another file or from the web. That affects three things:

Questions

Does converting SVG to PNG lose quality?

The PNG is as sharp as the SVG at the size you convert it to, but its size is fixed from then on: enlarge it later and it blurs. Convert at the largest size you'll need, since shrinking a PNG looks fine.

How do I convert SVG to PNG with a transparent background?

Every area the SVG leaves unpainted stays transparent in the PNG. If the SVG draws a filled rectangle behind everything, that background stays too, and you'd delete that rectangle in the SVG before converting.

More in image converters

Other tools