SVG to PNG converter
Upload an SVG file or paste its code and export a sharp PNG at the size you choose, with a transparent or solid background. Great for logos, icons and social images. It is free and runs in your browser.
How to use it
- Choose an SVG file, or paste the SVG code in SVG code (optional).
- Set the Width (px) and Height (px), or leave them empty to use the original size. Use Scale for sharper results.
- Keep Transparent background on, or turn it off and pick a Background color.
- The PNG is created automatically. Click Download to save it.
Complete guide to converting SVG to PNG
Why turn an SVG into a PNG
SVG is a vector format: it describes shapes with math, so it stays sharp at any size and is tiny for logos and icons. But many places only accept bitmap images: social networks, e-mail clients, app stores, presentation software and most upload forms. A PNG is a fixed grid of pixels that every program understands and that can keep a transparent background. This tool renders your SVG at the exact pixel size you need and saves it as PNG.
How the size is decided
The tool first looks for the natural size of the drawing: the width and height attributes of the root svg tag (plain numbers or values in px), and if they are missing, the third and fourth numbers of the viewBox. If only one of width or height exists, the other is worked out from the viewBox proportion. With neither, it uses the size the browser reports, or 512 x 512 as a last resort. Your own settings then override it:
| You fill in | Result |
|---|---|
| Nothing | The natural size of the SVG |
| Width (px) only | That width, height calculated to keep the proportion |
| Height (px) only | That height, width calculated to keep the proportion |
| Both | Exactly that width and height |
The result is then multiplied by Scale (1x to 4x) and rounded to whole pixels. The final size is limited to 8,192 px per side and 64 megapixels, and the SVG itself to 5 MB. Script tags are removed before drawing, and because the SVG is drawn as a plain image, scripts and outside resources such as linked fonts and pictures do not run or load. Nothing is uploaded.
Worked example
- In SVG code (optional) paste
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 100"><rect width="200" height="100" fill="#0a7"/></svg>. It has no width or height, so its natural size comes from the viewBox: 200 x 100. - Type 800 in Width (px) and leave Height (px) empty. The height becomes 800 x 100 / 200 = 400, so the PNG is 800 x 400.
- Set Scale to 2x. The size doubles to 1600 x 800.
- The tool shows Dimensions 1600 x 800 px and the File size. The file is named
image-1600x800.pngbecause pasted code has no file name. A file calledlogo.svgwould givelogo-1600x800.png.
The background stays transparent while Transparent background is on. Turn it off and choose a Background color (if not transparent) for a solid fill, which is useful for platforms that show transparency as black.
Tips and common mistakes
- If you give both width and height, the drawing is fitted to that box and may not keep its original proportion. Fill only one value when you want no distortion.
- Use a larger Scale for sharper images on high-density screens. A 48 px icon at 4x becomes 192 px.
- Text in the SVG may use a different font than you expect, since external fonts do not load. Convert text to paths in your design program or embed the font inside the file.
- Percentages in width and height, such as
100%, are ignored. Add a viewBox or fixed numbers so the natural size is clear. - If the tool says the SVG is invalid, check that the code starts with an svg tag and that all tags are closed. If both a file and code are given, the file is used.
- Some SVGs with embedded HTML cannot be exported by the browser.
Related tools
Make a full favicon set from the result with the favicon generator, shrink the PNG with the image compressor, or convert it for the web with the PNG to WebP converter.
Questions
Are scripts in the SVG executed?
No. The SVG is drawn as a plain image, where scripts and external resources do not run, and any script tags are removed before drawing.
What size will the PNG have?
If you leave width and height empty, it uses the size in the SVG (width and height, or its viewBox). Fill one value to keep the proportion, or both to force a size. The scale multiplies the result.
Why do some fonts or images look different?
An SVG drawn as an image cannot load external fonts or linked pictures. Convert text to paths or embed fonts and images inside the SVG for an exact result.
What is the maximum size?
Up to 8,192 px per side and 64 megapixels. The SVG file itself can be up to 5 MB.