Why this uses the browser's own SVG renderer#
SVG is a genuinely complex format — gradients, filters, clipping paths, embedded fonts, nested transforms — and a from-scratch SVG-to-raster implementation would inevitably render some of that incorrectly or not at all. Instead, this tool loads the SVG as a real <img> element, which every browser already renders using its full, standards-compliant SVG engine — the exact same code path that draws an SVG placed directly on a web page — then draws that rendered image onto a canvas and reads the pixels back out as a PNG. The output matches what the SVG would look like on a real page, because that is literally how it was rendered.
Where the output size comes from#
An SVG can declare its size explicitly with width/height attributes on the root <svg> element, or implicitly through its viewBox, which also defines the aspect ratio used for scaling. This tool reads whichever is present to determine a sensible default output size, and lets you override the width — the height then scales automatically to preserve the original aspect ratio, unless a percentage-based width/height forces a fallback to viewBox.
Transparent by default, because that is what SVG actually is#
An SVG with no background shape is transparent by nature — there is no implied white canvas underneath it, the same way a PNG or a piece of glass has no default color. This tool preserves that transparency by default, since assuming a white background would silently change what the graphic actually contains. A white-background option is available for cases where the destination genuinely needs an opaque image, like a JPEG-only upload target.