About this svg to png
Rasterize a self-contained SVG document into a PNG at your chosen dimensions. Paste the SVG markup, set the output width and height, then inspect the rendered preview before saving the image.
The browser validates the SVG as XML and decodes it locally from a blob. Drawing that image onto a canvas rasterizes its vector shapes. The output dimensions determine the pixel count and can be larger than the SVG’s original viewport.
Scripts, foreign objects, event handlers, external links and imported CSS are rejected. Only self-contained shapes and embedded image data are accepted. Fonts must already exist locally. A viewport with a different aspect ratio can leave spacing or stretch according to the SVG settings.
Using SVG to PNG starts with the SVG markup and Output width and Output height controls. The sample is a red 100 by 100 vector square. Output dimensions of 400 by 400 create a red PNG containing 160,000 pixels. Select Render SVG to update the result below the controls. Read the output together with the svg to png limitations described here before using it in a document, project or decision. Change one input at a time when comparing alternatives so that you can identify which change affected the result.
Which controls should I check first?
The SVG to PNG form labels its controls as SVG markup; Output width; Output height; Result. Use those labels to keep the source and settings separate. A sample argument that selects a mode is not additional source text. Choose the setting matching your intended operation before copying a result, and change it explicitly when comparing another mode. The labels describe what this form accepts; the worked examples below demonstrate only the stated supplied values.
How should I interpret this specific operation?
Rasterization turns vector shapes into pixels at the chosen dimensions. Increasing those dimensions can represent more detail from the vector source but can also increase memory sharply. The SVG is validated and restricted before decoding. Check relative resource dependencies and the final PNG appearance. A successful XML check is different from a browser rendering test, particularly for unsupported SVG features.
Worked helper values
These values come from the reproducible calculation examples supplied with this tool. Each row identifies the complete supplied arguments and the returned value. A visible ↵ denotes a line break and ⇥ denotes a tab in text examples. Settings appear alongside source data so that a different mode is not mistaken for an identical input. These are helper calculations, not observations of a live device, fetched target, image decoder, browser preview or downloaded file. Use the stated method above to relate the returned fields to the actual operation.
| Supplied values | Calculated return value |
|---|---|
| <svg xmlns="http://www.w3.org/2000/svg"><rect/></svg> | <svg xmlns="http://www.w3.org/2000/svg"><rect/></svg> |
| 400; 400 | {"width": 400, "height": 400} |
What actually happens to the picture?
The file is decoded to a raster pixel buffer before a new file is encoded. A filename extension does not perform either step. The preview represents decoded pixels; the download's bytes determine whether another application can open it. Keep the original file until the receiving application accepts the converted copy. An output can have the correct extension and still be unsuitable for an older editor because that editor lacks the required codec. Where the browser cannot encode the requested type, this workflow reports the limitation instead of handing you a renamed PNG.
How should I compare file size and detail?
Compare output dimensions first, then file size, then the appearance at one hundred percent zoom. A smaller download can reflect lossy compression or a smaller color palette rather than improved efficiency with identical detail. Look at text edges, smooth gradients, hair, foliage and other fine textures. Encoding an already lossy source again can add artifacts; a lossless destination prevents another lossy save at this step but cannot restore details previously removed. Byte size by itself is not a quality score, and a converted file can be larger than its source without anything being broken.
How do transparent edges behave?
Alpha-capable destinations can retain decoded transparent pixels, while formats without alpha require a background. Inspect semitransparent edges as well as fully transparent areas, since a soft shadow can change visibly after flattening. A white background suits some documents but can make a dark-site logo appear inside a white rectangle. Choose the background deliberately when the destination uses it. Palette formats may reduce transparency to an on-or-off decision rather than retaining every opacity level. Keep an alpha-capable source if you expect to place the image over several different backgrounds later.
How do I use svg to png?
The sample is a red 100 by 100 vector square. Output dimensions of 400 by 400 create a red PNG containing 160,000 pixels.
What does svg to png support?
The browser validates the SVG as XML and decodes it locally from a blob. Drawing that image onto a canvas rasterizes its vector shapes. The output dimensions determine the pixel count and can be larger than the SVG’s original viewport.
What are the limits of svg to png?
Scripts, foreign objects, event handlers, external links and imported CSS are rejected. Only self-contained shapes and embedded image data are accepted. Fonts must already exist locally. A viewport with a different aspect ratio can leave spacing or stretch according to the SVG settings.