Free tool · Image tools
SVG to PNG
Paste SVG code or choose an .svg file, set the size and background, and download a PNG. Your browser draws it on your device, so the file is never uploaded.
- Free
- No sign-up
- Runs in your browser
400 x 200 pxExample: the sample logo at 2x. Paste your own SVG to see yours.
- PNG
- Transparent
- SVG size
- 200 x 100 px
- PNG size
- 400 x 200 px
- Size read from
- width and height
- PNG file
- shown when drawn
How to use the SVG to PNG
- Paste the code into Paste SVG code, or press Choose an SVG file.
- Under Size, pick Scale (1x to 4x) or Custom size and type a width and height.
- Under Background, keep Transparent or pick Color and choose one.
- Check the preview and the PNG size, then press Download PNG.
How do I convert SVG to PNG?
Paste the SVG code or choose an .svg file, pick a size, and press Download PNG. The page draws the SVG with your browser's own renderer and saves the result as a PNG file. The sample logo on this page is 200 x 100 px. At 2x the PNG is 400 x 200 px, and at 4x it is 800 x 400 px.
The tool finds the SVG's own size in the opening <svg> tag. If both width and height are set, those are used. If they are missing or written as percentages, the size comes from the viewBox. If only one of the two is set, the other follows the viewBox proportions. The page shows which rule it used under Size read from.
An SVG with none of these has no size, so the page asks for one. Choose Custom size and type a width and height.
Use a PNG when the place you are sending the picture to asks for an image file and does not accept SVG. Keep the SVG itself as your master copy: it can be turned into a new PNG at any size later, and the PNG cannot be turned back into clean shapes.
| Written as | Pixels |
|---|---|
| 100 | 100 px |
| 12pt | 16 px |
| 1pc | 16 px |
| 1in | 96 px |
| 2.54cm | 96 px |
| 25.4mm | 96 px |
Units other than pixels are converted at 96 pixels per inch, so a width of 1in becomes 96 px. A width written as a percentage has no fixed size, so the viewBox is used instead.
How do I get a PNG with a transparent background?
Leave Background on Transparent. A PNG can hold transparent pixels, and an SVG is transparent wherever no shape covers it. The preview sits on a checkerboard so you can see which areas are clear.
Choose Color when the PNG goes somewhere that cannot show transparency, such as a document template or a print file. The color is painted behind the drawing before the PNG is saved. Pick white, a brand color or any other color with the color box.
A color background also hides the soft edges of semi-transparent shapes against whatever sits behind them later. If the PNG will be placed on a dark page, a transparent file keeps those edges clean. A white background does not.
The pixel format stays PNG either way. For a photo-like image where file size matters more than transparency, convert the PNG afterwards with PNG to JPG, which also drops transparency.
What size should the PNG be for a sharp result?
Pick the largest size you will need. An SVG is a set of shapes that can be drawn at any size, but a PNG is a fixed grid of pixels. A PNG can be shrunk without much loss. Enlarging one makes it blurry.
The table shows what each scale gives for four common SVG sizes. A 24 x 24 icon at 4x is 96 x 96 px. The same logo at 4x is 800 x 400 px. File size grows with pixel count, which is why the table also shows megapixels (MP).
For print, work backwards from the size on paper. A 3 inch wide logo at 300 pixels per inch needs 3 x 300 = 900 px. For a screen that doubles pixels, such as 2x displays, use 2x the size it will be shown at.
A PNG counts pixels only. The 300 pixels per inch of a print job comes from the size at which the picture is placed, not from the file, so the pixel size above is the number to get right. The page gives the exact pixel count, and nothing else about the file changes when it is placed larger or smaller.
This page draws up to 16,000 px on a side and 100 megapixels in all. A request beyond that shows a message instead of a broken file, because browsers cap the canvas they will draw.
| SVG size | 1x | 2x | 3x | 4x |
|---|---|---|---|---|
| Icon: 24 x 24 | NaN x NaN px (NaN MP) | NaN x NaN px (NaN MP) | NaN x NaN px (NaN MP) | NaN x NaN px (NaN MP) |
| Logo (sample): 200 x 100 | NaN x NaN px (NaN MP) | NaN x NaN px (NaN MP) | NaN x NaN px (NaN MP) | NaN x NaN px (NaN MP) |
| App icon: 512 x 512 | NaN x NaN px (NaN MP) | NaN x NaN px (NaN MP) | NaN x NaN px (NaN MP) | NaN x NaN px (NaN MP) |
| Social card: 1200 x 630 | NaN x NaN px (NaN MP) | NaN x NaN px (NaN MP) | NaN x NaN px (NaN MP) | NaN x NaN px (NaN MP) |
To shrink the file afterwards, use the Image Compressor. To change the pixel size of a PNG you already have, use the Image Resizer.
Why does text look different after converting?
The PNG uses the fonts installed on the device that draws it. SVG text is drawn with a font name, not with the letter shapes. If that font is not installed, the browser picks another one, and the width and style change.
This page refuses SVGs that point to outside files, so a font loaded from a web address is not available either. The reliable fix is to convert the text to outlines (paths) in your design program before you export the SVG. Outlined text is just shapes, so it looks the same everywhere.
When the SVG contains text, the page adds a note under the result so the difference does not come as a surprise.
Is it safe to convert an SVG from someone else?
Yes, because the page does not run the file. An SVG is text that can contain scripts and links. The code is handed to an image element and is never added to the page itself. The page also scans it first and stops without drawing if it finds any of these:
a script element, an event attribute such as onload, an XML entity declaration, an outside stylesheet or @import, an iframe, embed or object element, or a link to a file outside the SVG (an image, font or stylesheet at a web address). References to other parts of the same file and images embedded as data are allowed.
Drawing happens on your device. No part of the file or the PNG is sent anywhere.
Use it with
- Image to Base64: encode an image as a data URI.
- Image Compressor: reduce JPG/PNG/WebP size in the browser.
- Image Resizer: resize by pixels or percent.
Questions
How do I convert SVG to PNG?
Paste the code or choose an .svg file, pick a scale or a custom size, and press Download PNG. At 2x, the 200 x 100 px sample logo becomes 400 x 200 px.
How do I convert SVG to PNG with a transparent background?
Keep Background on Transparent. Pixels not covered by a shape stay clear in the PNG. Choose Color only when you want a solid background.
How do I get a high-resolution PNG from an SVG?
Use a larger scale or a custom size. The sample logo at 4x is 800 x 400 px. The PNG is drawn from the vector shapes at that size, so it is sharp at that size.
Why does my text look different after converting?
The PNG is drawn with fonts installed on the device. A font that is not installed is replaced by another. Convert text to outlines before exporting the SVG to keep the letters identical.
Can I convert SVG to PNG without Illustrator or Inkscape?
Yes. This page does it in the browser with no install: paste the code or choose the file, set the size and download.
Is my SVG uploaded?
No. The file is read and drawn on your device, and the PNG is made there. The page makes no network request with it.
How this page was made: the tool's results are computed in your browser by the code on this page, using the sources listed above; the explanations were drafted with AI help and checked against the tool's own output.