SVG to PNG Converter: Any Size or DPI

Convert SVG to PNG, JPG or WebP at any size, scale or DPI. Paste SVG code or open files, keep transparency or add a background. Runs in your browser.

or drop them here, or paste SVG code below

Example drawing: replace it with your own

Background

How to convert SVG to PNG

Paste SVG code into the box, or open or drop one or more .svg files. The preview updates as you type. Choose the output format and size, then download the image, copy it to the clipboard, or download every file at once as a ZIP. The page starts with an example you can replace.

Choosing the size

An SVG is a vector drawing, so it can be rendered sharply at any size. The converter first works out the SVG’s own (intrinsic) size from the rules that browsers use for SVG images:

Then pick how to size the output: a scale factor (2× suits high-density screens), an exact width or height with the other side in proportion, both width and height (the drawing is centred and keeps its proportions), or a print resolution in DPI.

DPI Scale A 2 in (192 px) wide SVG becomes
96 1× 192 px
150 1.5625× 300 px
300 3.125× 600 px
600 6.25× 1200 px

In DPI mode the resolution is also written into the PNG (pHYs chunk) or JPG (JFIF header), so print and layout programs place the image at its intended physical size.

Transparency and background

PNG and WebP keep transparent areas. Untick Transparent to fill them with a colour. JPG has no transparency, so the background colour is always used there, white unless you choose another.

What cannot be rendered

The SVG is drawn by your browser as an image, the same way an <img> tag shows it. In that mode browsers never load anything the SVG refers to by URL, so linked images, web fonts and imported stylesheets are left out, and nothing is fetched from the internet. The converter lists such references when it finds them. To include them, embed images as data: URIs and convert text to outlines in your drawing program, or use a font installed on your device.

Scripts and event handlers inside the SVG never run, which makes it safe to convert files from unknown sources. HTML embedded with a <foreignObject> element is left out in browsers such as Chrome, which refuse to turn it into pixels; the converter tells you when that happens. Animations are captured in their first frame. Gradients, patterns, masks, clipping paths, filters and CSS styles inside the file render as they do in the browser.

Copied from a web page, inline SVG often lacks the xmlns="http://www.w3.org/2000/svg" attribute that standalone SVG files need, or uses HTML entities such as &nbsp;. The converter adds and replaces these for you and says so.

Frequently asked questions

Is my SVG uploaded anywhere?

No. The SVG is parsed and drawn by your own browser, and the PNG is created on your device. Nothing is sent to a server or stored.

How do I get a high-resolution PNG from an SVG?

Set the size by scale (4× or 8×), by width, or by DPI (300 for print). The drawing is rendered at that size, so edges stay sharp instead of being enlarged from a small image.

Why is my text shown in a different font?

Fonts that the SVG loads from a URL, such as Google Fonts, are never loaded when an SVG is drawn as an image. The text uses a font installed on your device instead. Convert the text to paths in your editor to keep the exact look.

Why are images inside my SVG missing?

They are linked by URL rather than embedded. Browsers do not load linked files for SVG images. Embed them as base64 data URIs and they will appear.

Why is the output 300 × 150 pixels?

Your SVG has no width, height or viewBox, so there is no size to start from and browsers use 300 × 150. Add a viewBox, or set the output width and height here.