Shard Tools

SVG to PNG

Rasterize an SVG to PNG at the size you pick, with transparency preserved.

Maintained by Roshan.

Use SVG to PNG

Renders an SVG to PNG at whatever size you choose. The file is drawn by this tab's own renderer and never uploaded.

Most SVGs do not declare a pixel sizeAn SVG carrying only a viewBox has no intrinsic size, and a browser asked to draw it falls back to 300 x 150. This tool reads the viewBox instead, so the output keeps the artwork's real proportions.

Explore image tools

Find related browser-local tools for nearby tasks without starting another search.

Browse all image tools

About SVG to PNG

An SVG describes shapes rather than pixels, so converting one to PNG means choosing a size - and that choice is where most converters quietly get it wrong. An SVG only has an intrinsic pixel size if its opening tag carries width and height attributes. A great many do not; they carry a viewBox instead, which defines proportions without committing to a resolution. Asked to draw such a file, a browser falls back to a fixed default of 300 by 150 pixels, ignoring the artwork's real shape entirely. A tool that simply draws the image and saves the canvas therefore returns a squashed thumbnail. This converter reads the viewBox itself, works out the true proportions, and lets you multiply from there, which is also what makes exporting at two or four times normal size possible.

Shape and export choices

  1. The file is read as text and the opening svg tag is examined. Width and height attributes are used when present and expressed in a real unit; pixels, points, inches, centimetres and millimetres are all converted correctly.
  2. When those attributes are missing, or given as a percentage, the viewBox supplies the proportions instead. A viewBox of 0 0 512 512 means the artwork is square, whatever the browser would otherwise assume.
  3. If neither is usable the tool falls back to 300 by 150 and says so on screen, so a guess is never presented as a measurement.
  4. Explicit pixel dimensions are written onto the SVG before it is drawn, which is what stops the browser applying its own default.
  5. The artwork is rendered onto a transparent canvas at the chosen scale and encoded as PNG, so the alpha channel is preserved and text stays crisp rather than being upscaled from a small bitmap.

Good fits for SVG to PNG

An icon set that has to go into a slide deck

Presentation software often handles SVG badly. Exporting at two or three times the display size gives a PNG that still looks sharp on a high-density screen or a projector.

A logo that came out tiny in another converter

That is the 300 by 150 default at work. Check what this page reports as the source of the size: if it says the viewBox, the proportions are being read from the artwork rather than guessed.

Check the image before download

Questions about SVG to PNG

Why did another tool give me a 300 by 150 image?

Because the SVG has no width and height attributes, and that is the size a browser assumes for a replaced element with no intrinsic dimensions. Reading the viewBox instead is the fix.

How do I get a high-resolution export?

Raise the scale. At 4x, a 512-unit viewBox produces a 2048-pixel PNG, which is usually plenty for print-adjacent use or a retina display.

Is the transparent background kept?

Yes. PNG carries an alpha channel, so anything transparent in the SVG stays transparent.

Why does my text look wrong?

The SVG almost certainly names a font this device does not have, so the browser substituted another. Convert the text to paths in your vector editor before exporting.

Related tools

SVG to JPG

Render an SVG to JPG at any scale in your browser. Transparent areas become white, as JPEG requires.

SVG to WebP

Rasterize an SVG to WebP at the size you choose. Keeps transparency and produces a smaller file than PNG.

PNG to JPG

Convert PNG to JPG locally in your browser. Transparent pixels are placed on white, dimensions stay unchanged, and the image is never uploaded.

ICO to PNG

Convert a Windows ICO or favicon to PNG in your browser, keeping the transparency that makes an icon usable.