SVG to PNG: Rasterising Scale and Background

Open Tool SVG to PNG

Three decisions when rasterising

SVG describes shapes, and turning it into PNG means rasterising, which requires three choices: target size, scale multiplier and background. Locking aspect ratio ties width and height so icons are not stretched. The clarity options of 1x to 4x multiply the viewBox dimensions, so a hundred-unit-wide viewBox at 4x yields four hundred pixels. Output can be PNG, JPEG or WEBP, with background transparent, white or custom. SVG has no background of its own, transparent areas survive as alpha in PNG, and converting to JPEG forces a fill or transparency turns black.

Steps

  1. Paste the SVG source, or upload a file with the upload button.
  2. Load the example first to confirm rendering works.
  3. Set clarity: 2x for web, 3x or 4x for high-density screens and print.
  4. Tick aspect lock so editing one dimension scales the other.
  5. Pick format and background; for JPEG always replace transparency with a colour.
  6. Generate, then download the single image or a ZIP.

Scale maths, transparency, clarity

Multipliers have limits. Icons are fine at 3x, while a large screenshot-like SVG at 4x becomes thousands of pixels wide with painful memory and download cost. The accurate basis is the viewBox ratio, not width and height attributes, and files exported without a viewBox distort when scaled. Text elements need fonts converted to paths, since missing fonts fall back to system defaults and change the glyphs entirely. Gradients and filters band at low multipliers, and 4x cleans it up. Transparent to JPEG yields black, which is a format limit rather than a bug. And PNG size grows with pixels squared, so a 4000-pixel-wide four-colour icon can dwarf its source.

Common mistakes

Leaving transparency on a JPEG conversion. Changing width without locking the ratio. Exporting before converting text to outlines. Using 1x and upscaling later, which softens edges. Applying 4x to huge canvases. And pasting source with an unclosed root element so parsing fails.

Where rasterising ends

This rasterises and does not repair malformed SVG or missing fonts, which pass through as-is. Print-grade CMYK and spot colours need publishing software. Animated SVG and embedded scripts are not executed, so exports capture the first frame. And repeatedly scaling a low-resolution bitmap as if it were vector keeps losing sharpness.

⏫︎