SVG to PNG Converter

Render an SVG to PNG, JPEG or WebP at any size, with or without a background.

About SVG to PNG Converter

Convert an SVG to PNG, JPEG or WebP at 1x to 4x or an exact pixel size, with a transparent or coloured background, without uploading it.

How to use

  1. Paste SVG markup into the box, or choose an .svg file (up to 5 MB).
  2. Pick a size: 1×, 2×, 3× or 4× the size the SVG declares, or Custom to type a width and height in pixels.
  3. Choose PNG, JPEG or WebP. Keep the background transparent, or untick it and pick a colour.
  4. Check the preview and download.

What it does

  • Takes the 1× size from the SVG's width and height. If they are missing or are percentages, it uses the viewBox; if there is no viewBox either, it uses the browser default of 300×150 and says so.
  • Renders with your browser's own SVG engine at the output size, so edges are sharp at 4× and not an enlarged 1× image.
  • In Custom, Lock aspect ratio makes the height follow the width. With it off, a size of a different shape does not stretch the drawing: it follows the SVG's preserveAspectRatio, which by default fits and centres it.
  • Adds the SVG namespace when pasted markup lacks it, which is common for SVG copied out of an HTML page.
  • Limits the output to 8,192 px per side and 16.7 megapixels, and tells you when a request was scaled down.
  • JPEG has no transparency, so it always gets the background colour.

It does not load anything the SVG refers to by URL, such as linked images, web fonts or external stylesheets; browsers block those when an SVG is drawn as an image. Text set in a font that is not installed on your device falls back to another font. Scripts do not run, and an animated SVG is captured as a still. Markup that is not well-formed XML, or that the browser cannot draw, is reported as an error.

Example

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
  <circle cx="12" cy="12" r="10" fill="#057da0"/>
</svg>

Size 4× → 96×96 PNG, transparent background

Privacy

The SVG is parsed and drawn by your browser. Nothing is uploaded, and the markup is not stored.

Frequently asked questions

How do I convert an SVG to a PNG with a transparent background?
Paste or open the SVG, choose PNG and leave "Transparent background" ticked. Areas the drawing does not cover stay transparent in the PNG. WebP keeps transparency too; JPEG cannot.
What size should I export an SVG at?
Export at the size it will be shown, multiplied by the screen density you need to cover. An icon shown at 24 px wants a 48 px PNG for 2× screens and 72 px for 3×. An SVG scales without loss, so a larger export costs file size, not sharpness.
Why does my SVG look different after converting it to PNG?
Usually because it depends on something outside the file. A browser drawing an SVG as an image will not fetch linked images, web fonts or stylesheets, so text falls back to a local font and linked pictures are left out. Convert text to outlines and embed images to avoid it.
Can I convert an SVG to JPG?
Yes. Choose JPEG as the output format and pick a background colour, since JPEG cannot store transparency. PNG is the better choice for logos and icons, because JPEG compression blurs sharp edges.