🖌️

SVG to PNG Converter

Paste SVG markup or upload a file and download it as PNG at any scale.

About this tool

Last updated:

Convert SVG to PNG in your browser

This SVG to PNG converter turns SVG code or an .svg file into a PNG image. You can scale the output up to 4 times and choose a transparent, white or black background. It converts one SVG at a time. For many files at once, see image.mondaytool.com.

How to use it

  1. Paste your SVG markup into the SVG Code box, or click Upload .svg to load a file into it.
  2. Choose a Scale of 1×, 2×, 3× or 4×. The default is 2×.
  3. Choose a Background: Transparent, White or Black.
  4. Click Convert to PNG and check the preview.
  5. Click Download PNG. The file is saved as image.png.

How it works

The tool parses your code, works out the image size and draws the SVG onto an HTML canvas at that size times your scale. The canvas is then exported as PNG. The size comes from the width and height on the root element. If those are missing, it uses the viewBox, and if there is no viewBox either it falls back to 200 × 200 pixels. Units such as px, pt, in, cm and mm are converted to pixels. Percentages are not.

A 200 × 200 SVG at 3× gives a 600 × 600 PNG. Very large results are reduced to fit the browser's canvas size limit. The conversion runs in your browser and your SVG is not uploaded.

Limits and errors

  • The root element must be <svg>. Invalid markup shows an "Invalid SVG" message.
  • SVGs that use <foreignObject> may not export, and the tool will say so.
  • Linked external images or fonts may not load, because the SVG is drawn as a standalone image.
  • The background choices are limited to transparent, white and black.

Frequently asked questions

How do I get a transparent PNG?

Leave Background on Transparent. The preview shows a checkerboard behind the image so you can see the clear areas.

How do I make the PNG sharper?

Raise the scale. Because SVG is vector, a higher scale redraws the shapes at a larger size instead of stretching pixels.

Why does my SVG fail to convert?

Most often the markup is not valid XML, for example an unclosed tag or a missing xmlns attribute. Check the error message under the code box.

More to explore

Related Image Tools

Browse all tools from the same category.

Showing 1-2 of 20