SVG to PNG Converter with Safe Preview
Render SVG to PNG at 1x to 8x or an exact width, with a transparent or coloured background. The SVG is cleaned first. Runs in your browser.
Runs in your browser. Nothing is uploaded.
Images & PDFSVG to PNG
SVG source
Max 5MB each
Preview and PNG
Choose an SVG file or paste its code. A safe preview appears here, then press Render PNG to get the image.
Example
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 80">...</svg>, scale 2x, transparent
[email protected]: 240 x 160 px with a transparent background.
How the SVG is rendered
SVG is a vector format described in XML, and a PNG is a grid of pixels, so converting means choosing the pixel size. You can scale the SVG by 0.5x up to 8x of its own size, or give an exact width in pixels and let the height follow the shape. Because the drawing is redrawn at the final size rather than enlarged afterwards, edges stay sharp even at 8x. The PNG can be transparent or have a white, black or custom colour behind it.
Paste the SVG code or load a file. The preview you see is the cleaned version of your SVG as the browser draws it, so you can check the result before you render it.
Why the SVG is cleaned first
An SVG file can contain scripts, event handlers, links to other files and even embedded HTML. This tool never puts your SVG into the page as markup. It parses the file in a detached document, removes scripts, foreignObject, animation elements and event attributes with DOMPurify, drops links that point outside the file and removes CSS that could fetch something, then draws the cleaned result through an image element, which cannot run scripts or load other resources. A short note tells you what was removed.
This matters when you convert SVGs you did not write, such as downloads from icon sites or exports from unknown tools. It also means a few things are intentionally not rendered, so if a file relies on a script to draw itself you will see a plain or empty result.
SVGs without a size, and other limits
Some SVGs have no width, height or viewBox. When there is a viewBox the shape is known and the tool uses it. When there is nothing at all, the browser default of 300 x 150 pixels is assumed and a notice says so, so set a width yourself if that is wrong. Sizes given in units such as mm or pt are converted at 96 pixels per inch, and percentages fall back to the viewBox.
Fonts are the main limit. Text in an SVG is drawn with fonts installed on your device, and fonts or images the SVG links from the internet are not loaded. If a logo relies on a custom font, convert the text to outlines in your design tool first. The output can be at most 16,384 pixels on a side and 64 megapixels, and SVG text is limited to 5 MB.
Frequently asked questions
Is it safe to convert an SVG from an unknown source?
The SVG is cleaned with DOMPurify and extra rules, and is only drawn through an image element, never inserted into the page. That removes scripts and external references. As with any file from an unknown source, still review the result.
How do I get a transparent PNG?
Leave the background on Transparent. Any area the SVG does not paint stays transparent in the PNG.
What if my SVG has no width, height or viewBox?
A default of 300 x 150 pixels is used and the tool tells you. Enter a width to choose the size you want.
Why does the text look different?
SVG text uses fonts available on your device. Linked web fonts are not loaded. Convert text to outlines before exporting if the font must be exact.
Is the SVG uploaded?
No. Parsing, cleaning and drawing all happen in your browser.
