IMAGES / SVG TO PNG

SVG to PNG converter

This converter turns an SVG file or pasted SVG code into a PNG image. It draws the SVG at its own size first, then you can set the width, height or scale and keep a transparent background or fill it with a color. The conversion runs in your browser.

1. Add your SVG

Or drop a file here, or paste SVG code below.

No SVG yet. Nothing is uploaded.

Preview

Your image appears here as soon as you add an SVG.

Add an SVG to see the image you will download.

How to convert SVG to PNG

To convert an SVG to PNG, add the SVG, check the preview, change the size or background if you need to, and select Download PNG. Output format is already PNG when this page opens, so the first preview you see is the PNG.

  1. Select Choose SVG file, drop the file onto the Add your SVG area, or paste SVG code into the SVG code box. Try an example loads a sample drawing.
  2. Read Original size in the Output settings section. Change Width (px), Height (px) or Scale from original if you need a different size.
  3. Keep Background on Transparent, or choose Solid color and pick a Background color.
  4. Select Download PNG. The file is named after the SVG plus its pixel size, such as logo-800x600.png.

Each change renders a new preview after a short pause. Start over clears the SVG, its settings and the image.

How the PNG size is set

The PNG starts at the SVG's own size, read from the width and height on its root svg element. Units convert at 96 pixels per inch and 16 pixels per em. An SVG with only a viewBox takes the viewBox size, and one with no size at all becomes 100 × 100 pixels.

Root attributesPNG size at Scale 1
width="400" height="300"400 × 300
width="2in" height="1in"192 × 96
width="10cm" height="5cm"378 × 189
width="72pt" height="36pt"96 × 48
width="10em" height="5em"160 × 80
viewBox="0 0 24 24" only24 × 24
width="200" viewBox="0 0 100 50"200 × 100
none of these100 × 100

Scale from original multiplies both sides, so Scale 8 turns a 24 × 24 icon into a 192 × 192 PNG. Fractional sizes round to whole pixels. With Lock aspect ratio on, a new Width (px) sets a matching Height (px). With it off, the drawing fits inside the new size with centered padding and is never stretched.

Sharp edges and transparent areas

Shapes and text are drawn at the output size, so a PNG at Scale 4 has clean edges with four times the pixels per side. It is not a small image stretched up. Bitmap images embedded in the SVG are the exception, because they keep the detail of their own resolution.

With Background set to Transparent, the PNG keeps the transparent and partly transparent areas of the SVG. A shape at 50% opacity stays half transparent in the PNG, and the checkerboard behind the preview marks those pixels. Solid color fills the whole image behind the drawing with the Background color you pick.

PNG compression is lossless, and the same SVG with the same settings gives a byte-identical file each time. Output format also lists JPEG and WebP. JPEG cannot store transparency, so it always fills those areas with the background color.

Limits of static rendering

The PNG is a static picture of the SVG, drawn by the resvg renderer. Text uses the bundled DejaVu Sans font instead of the fonts the SVG names. Images, fonts and stylesheets linked from other files or servers are not loaded, so they are missing from the PNG.

Scripts, animation and embedded HTML do not run, and some filters or other SVG features can render differently or drop out. Check the preview before you use the file.

The tool sets no file-size or pixel cap. A size larger than the browser's canvas or memory can hold ends in an error that keeps your SVG and settings, so you can try a smaller width and height. It reads one SVG at a time as UTF-8 or UTF-16 text, gzip-compressed SVGZ files included, and refuses an SVG that declares external entities.

Questions

Can I convert an SVG file to PNG?

Yes. Choose the SVG file on this page, or paste its code, and the tool renders a PNG preview right away. Output format starts on PNG, so select Download PNG to save it. Change Width (px), Height (px) or Scale from original first if you need a different size.

How can I convert SVG text to PNG?

Paste the SVG code into the SVG code box. The preview renders about half a second after you stop typing, and Download PNG saves it. Text elements inside the SVG are drawn with the bundled DejaVu Sans font. To keep a specific typeface, convert the text to paths in your editor first.

Is SVG higher quality than PNG?

An SVG stores shapes, so it stays sharp at any display size, while a PNG stores a fixed grid of pixels. Converting draws the shapes at the pixel size you choose, so pick the largest size you need. A PNG can also be larger: the 200-byte example on this page became an 8.58 KB PNG in Chrome.

How can I convert multiple SVG images to PNG?

This page converts one SVG at a time. After you download a PNG, select Replace SVG to choose the next file. Output format, quality and background carry over, and each new SVG starts at its own size. Each PNG is named after its SVG file plus its pixel size.

Are my files uploaded?

No. The SVG is read, drawn and saved as PNG on your device, in a Web Worker in your browser. Its contents and file name are not sent anywhere or kept in browser storage. The renderer and its bundled font load from this site the first time you add an SVG.

  • SVG Viewer: inspect the SVG code and its dimensions before you convert it.
  • SVG Optimizer: shrink the SVG markup when you also keep the vector file.
  • Image DPI changer: set a print density in the PNG without changing its pixels.
  • Compress image: try a smaller PNG and compare the sizes before you download.