A designer sends you the company logo as logo.svg. It looks perfect in the browser, but the slide deck template, the marketplace listing and the social media scheduler all ask for a PNG. Or a developer needs a raster copy of an icon for an app store screenshot, and the one exported last year is fuzzy on a modern laptop screen.
Converting SVG to PNG is easy; converting it at the right size is where most people go wrong. This guide explains the difference between the two formats, how to choose the output dimensions for each job, and the handful of SVG quirks that make a render look different from what you expected.
Vector versus raster in one minute
An SVG file is a set of drawing instructions written in XML: "draw a rounded rectangle here, fill it with this gradient, place this path there". Because it describes shapes rather than pixels, it can be drawn at any size and stays crisp.
A PNG is a grid of pixels. Once it exists at 400 × 400, enlarging it means inventing pixels, which is why small PNGs look soft or jagged when stretched. PNG is lossless, and it supports full alpha transparency, so it is the natural raster target for logos and icons.
Converting SVG to PNG is called rasterising: the browser (or another renderer) follows the drawing instructions onto a canvas of a chosen size, then saves the pixels. The key decision is therefore the canvas size.
Where the "original size" comes from
An SVG usually declares its intrinsic size in width and height attributes, and its coordinate system in viewBox. For example:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" width="120" height="120">
If width and height are missing, renderers fall back to the viewBox proportions, and if both are missing, browsers use a default of 300 × 150. That default is a common reason for an oddly shaped or tiny PNG.
Choosing the right pixel size
Think about the largest size the image will ever be displayed, then multiply by the screen density.
| Destination | Suggested output |
|---|---|
| Web image shown at 200 px wide | 400 px wide (2x) for sharp display on high-density screens |
| Slide deck logo | 1,000-2,000 px wide |
| App store or marketplace icon | The exact size the platform specifies (check its current guidance) |
| Printed flyer | Physical width in inches × 300 |
A logo printed 3 inches wide at 300 DPI needs 900 pixels. Going far beyond what is needed only makes the file heavier.
Convert SVG to PNG in your browser
Our SVG to PNG converter renders the file with your own browser's SVG engine, so nothing is uploaded.
- Open SVG to PNG. Use the Upload SVG tab to drop a file (up to 10 MB), or switch to Paste SVG code and paste the markup directly, which is handy when you copied an icon from a code editor or an icon library.
- Check the Original size shown, which is read from the SVG's own dimensions.
- Under Output size, pick 1x, 2x or 4x, or choose Custom width and type a width in pixels. The height follows the aspect ratio. The output line shows the exact dimensions; very large requests are capped at 8,192 px on the longest side.
- Leave Format on PNG (transparent). The same tool can also produce JPG or WebP if you need them.
- Set Background to Transparent, or choose Solid colour and pick a colour if the PNG will sit on a surface that should not show through.
- Watch the Preview, which updates as you change settings, then click Download PNG. The file name includes the pixel size, for example
logo-480x480.png.
Other ways to do it
Inkscape (free desktop app)
Inkscape opens SVGs natively and has an Export panel where you set the DPI or pixel width. It is the best choice when the SVG uses features browsers do not render well, and it can also be driven from the command line:
inkscape logo.svg --export-type=png --export-width=1024
rsvg-convert and ImageMagick
On Linux and macOS, rsvg-convert -w 1024 logo.svg -o logo.png is fast and scriptable. ImageMagick (magick -density 300 logo.svg logo.png) also works, but its output depends on which SVG renderer it was built with, so results can differ from the browser.
Design tools
Figma, Illustrator and Affinity Designer export PNG at chosen scales. If the SVG came from one of these tools, exporting from the source file avoids any conversion quirks.
A browser screenshot
Tempting, but a screenshot captures the image at screen size and includes whatever is behind it. You lose transparency and control over resolution. Use it only for a quick preview.
Why a PNG can look different from the SVG
Fonts are missing or substituted
If the SVG contains <text> that refers to a web font by URL, or a font you have installed but the renderer does not know about, text falls back to a default font. The browser also does not load external resources when rasterising for security reasons. The reliable fix is to convert text to outlines (paths) in your design tool before exporting the SVG.
Linked images do not appear
The same rule applies to <image href="https://...">. Embed pictures inside the SVG as data URIs, which you can create with Image to Base64, or export the SVG with images embedded.
The SVG will not render at all
An error such as "This is not valid SVG/XML" usually means an unclosed tag or stray characters from copying. Open the file in the SVG Viewer to find the problem, or clean it with the SVG Optimizer, which also removes editor clutter that sometimes confuses renderers.
Thin lines look faint at 1x
Hairlines of 0.5 or 1 unit can fall between pixels at small sizes and render as grey, blurry strokes. Export at 2x or 4x, or adjust stroke widths in the source.
What to do with the PNG next
- Making a site icon? Feed a large square PNG into the Favicon Generator to get every size at once.
- Need smaller files for a web page? Convert the PNG with PNG to WebP.
- Need a white-background copy for a document? Use SVG to JPG directly.
Frequently asked questions
Does converting SVG to PNG reduce quality?
The PNG is lossless, but it is fixed at the pixel size you choose. Export at the largest size you will need, because enlarging the PNG later will make it blurry.
How do I keep a transparent background?
Keep the output format as PNG and the background set to Transparent. Areas of the SVG with no fill will stay transparent in the PNG.
What resolution should I export an SVG logo at?
For screens, use at least twice the size it will be displayed at. For print, multiply the printed width in inches by 300.
Why does the text in my PNG use the wrong font?
The renderer cannot find the font the SVG refers to. Convert text to outlines in your design tool, or embed the font, then export again.
Can I convert SVG code without saving a file?
Yes. Use the Paste SVG code tab, paste the markup starting with the svg tag, and the preview renders immediately.