SVG to PNG
Convert SVG files to PNG at any size or DPI, with a transparent or coloured background, many at once.
Drop images here or paste them, or
Your images never leave your device
Processed in this browser · SVG · up to 50 at a time
Turns SVG files into PNG images for apps, documents and sites that do not take SVG. Choose the size as a multiple of the file's own size, as an exact width, or as a print DPI, keep the background transparent or fill it with a colour, and convert up to 50 files at once, gzipped .svgz included. Each SVG is drawn as a vector at the size chosen, so a small icon saved at 4× stays sharp. Files are drawn in your browser and never uploaded.
How to use it
SVG size applies to every SVG in the list. Scale (default 1×) multiplies the size the file states: 1×, 2×, 4× or a custom 0.1 to 20. Width (default 1,024 px, up to 30,000) sets the width in pixels, the height following each file's shape. DPI (default 300, up to 1,200) prints the file's size at that resolution and writes the DPI into the PNG, so print software places it at its intended size.
Background is transparent by default; choose Colour to fill the transparent areas, white for a document or slide. Each file shows its own size and the PNG's, with any notes on what could not be drawn. Drag the divider on the preview to compare the PNG with the SVG. Downloads are named after the original with -converted.png; with several files, Download all saves a ZIP. Options are remembered on this device.
How an SVG's size becomes pixels
An SVG states its size in its width and height, in CSS units: pixels, or points, inches, centimetres and millimetres, which convert at CSS's fixed 96 px to the inch (1 pt is 4⁄3 px). Where they are missing or given in percent, the viewBox gives the size; where the file states neither, browsers draw it at 300 × 150, and the result says so. A size in em or ex counts 16 px and 8 px, the browser defaults.
The PNG's pixels are that size times the scale. A DPI stands for a scale of DPI ÷ 96: a 1-inch logo (96 px) at 300 DPI becomes 300 pixels across, which prints 1 inch wide at 300 DPI. The file is then drawn at that size by the browser's own SVG renderer, its viewBox stretched to the new size, so curves and text are drawn afresh rather than enlarged from a small image. A file without a viewBox is given one from its stated size first, so it scales instead of being cut off.
The drawing is made as an image, as a web page shows an SVG in an <img>: scripts in the file never run, and it loads no other file. Pictures and fonts embedded in the file as data: URLs are drawn; ones it links to are not, and the result counts them. An animated SVG is drawn at its first moment. A size larger than this browser can hold is scaled down to fit, with a note.
Examples
A 24 px icon for a high-density screen
- icon.svg
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="#16a34a"/></svg>
- SVG size
- Scale, 4×
The file states 24 × 24 px, so the PNG is 96 × 96 px: sharp on a screen with four device pixels to each CSS pixel, or as an app icon at that size.
The same icon for print at 300 DPI
With DPI at 300, the 24 px icon is a quarter of an inch, so the PNG is 75 × 75 px (3.125×), with 300 DPI written into it: a document or print shop places it a quarter of an inch wide.
A file with no size
- banner.svg
- <svg xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="#2563eb"/></svg>
- Note on the result
- No size in the file: drawn at 300 × 150; choose a width.
With neither width, height nor viewBox, the drawing has no size of its own. Choose Width to give it one.
Scale at common DPIs
| DPI | Scale | 24 × 24 px icon |
|---|---|---|
| 72 | 0.75× | 18 × 18 px |
| 96 | 1× | 24 × 24 px |
| 150 | 1.563× | 38 × 38 px |
| 300 | 3.125× | 75 × 75 px |
| 600 | 6.25× | 150 × 150 px |
Frequently asked questions
<foreignObject> keeps Chrome, Edge and Safari from letting a page read the drawing back, so it cannot be saved as a PNG there. Firefox allows it. Charts and diagrams exported with HTML labels are the usual case.See also
- PNG to SVG — to trace a PNG or JPG logo the other way, into an SVG.
- Image Converter — to save SVG as JPG or WebP, or convert other formats.
- Image to Base64 — to embed an SVG or PNG in HTML or CSS as a data URI.