How to Convert SVG to PNG at the Right Size (and Keep It Sharp)
Convert SVG to PNG free in your browser, at the size you need, with transparency kept. How to pick pixels and DPI, why fonts go missing, and Inkscape options.
To convert an SVG to PNG, open it in a converter that draws the vector at a fixed pixel size and saves the result, keeping transparent areas transparent. The free SVG to PNG converter does this in your browser without uploading the file. The one decision that matters is the size: a PNG can't be enlarged later without going blurry, so export it at the pixel size you will actually use, or bigger.
This guide explains how the converter picks the size (and how to make it bigger), how to work out pixels for screens and print, why web fonts and linked images can disappear, and how to do the same job in Inkscape or Chrome.
Vector vs raster: why the size decision matters
An SVG is a set of drawing instructions: "a circle of radius 10 at this point, filled purple". The browser can follow them at any size, so an SVG logo is sharp on a phone and on a 4K monitor. A PNG is a grid of pixels. Converting means choosing how many pixels, once.
Enlarge a 24×24 PNG to 240 pixels and each original pixel becomes a 10×10 block, which looks soft or blocky. Draw the SVG at 240 pixels instead and the edges stay crisp. So if you aren't sure, export larger: you can always shrink a PNG cleanly with the image resizer.
How the converter decides the PNG size
The site's converter has no width or height box. It asks the browser for the SVG's own size and makes a PNG exactly that big. We tested different SVG headers in Chrome:
What the <svg> tag says | PNG size you get |
|---|---|
width="24" height="24" | 24×24 |
width="800" height="400" | 800×400 |
width="2in" height="1in" | 192×96 (96 pixels per inch) |
Only viewBox="0 0 100 100" | 150×150 |
Only viewBox="0 0 200 100" | 300×150 |
No size and no viewBox, or width="100%" | 300×150 |
Icon files are often 24 or 48 pixels, and SVGs exported without a width and height come out at 150 or 300 pixels. Both are too small for most uses. The fix takes a minute in any text editor.
Step by step: convert at a bigger size
- Open the SVG in a text editor, such as Notepad (right-click the file, choose Open with, then Notepad). The first tag looks like
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">. - Change width and height to the pixel size you want, in the same proportion, for example
width="1024" height="1024". Leave the viewBox alone; it tells the browser to scale the drawing up to fill the new size. - If there is no viewBox, add one using the old numbers first:
viewBox="0 0 24 24". Without it, a bigger width only adds empty space: in our test the drawing stayed 24 pixels across in the top-left corner of a 240×240 PNG. - Save, then drop the file on the converter. The upload box lists JPG, PNG and other photo formats, but it accepts
.svgfiles too. Check the size shown under Original, click Process image and download the PNG (it is namedyourfile-ethicalfusion.png).
Two parts of the screen don't apply to SVG. The Quality slider does nothing, because PNG is lossless. And the result line usually says the file is "larger than the original, so try a lower quality": a PNG almost always weighs more than the short text of an SVG, and that's expected. If the PNG is too heavy for a website, convert it with the PNG to WebP converter.
For square icons there's a shortcut. The favicon generator also accepts SVG and redraws it at every size up to 512×512; our 24-pixel SVG came out crisp at 512 with no editing.
Choosing the output size and DPI
Work out pixels from where the PNG will be used:
| Use | How to work it out | Pixels to export |
|---|---|---|
| Logo shown 200 px wide on a website | 200 × 2 for high-density phone screens (× 3 for the sharpest) | 400 (or 600) wide |
| Full-width slide image | Slide width at Full HD | 1920 wide |
| Logo printed 5 cm wide | 5 ÷ 2.54 × 300 DPI | 591 wide |
| Full A4 width in print | 21 ÷ 2.54 × 300 DPI | 2480 wide |
| App or site icon | Largest icon size needed | 512 × 512 |
DPI (dots per inch) only means something for print: it links pixels to physical size. The formula is pixels = centimetres ÷ 2.54 × DPI, or inches × DPI. 300 DPI is the usual target for sharp print; 150 is fine for large posters seen from a distance.
The PNG from the converter carries no DPI value at all. We checked the file: it has no resolution (pHYs) block, so Word or a print shop will use its own default. That's fine, because pixels are what count: place the image and set its printed width to 5 cm, and a 591-pixel PNG prints at 300 DPI.
Keeping transparency
PNG supports full transparency and the converter keeps it. In our test the corners around a circle logo came out fully transparent, so the logo sits cleanly on any coloured background. Transparency is lost if you later convert to JPG, which has none: the PNG to JPG converter fills the background white.
If you need a white or coloured background instead, add a full-size rectangle as the first shape in the SVG (for example <rect width="100%" height="100%" fill="#ffffff"/> right after the opening tag), or use Inkscape's background option below.
Why fonts and images can go missing
When a browser draws an SVG as an image, which is how every online converter works, it uses a restricted mode for security: the SVG can't fetch anything from the internet. We tested what that means in Chrome:
- Web fonts don't load. An SVG whose text used Lobster from Google Fonts via
@importrendered in the default serif font, pixel for pixel the same as a font name that doesn't exist. - Installed fonts do load, but only ones on your computer. Text set in Comic Sans MS rendered in Comic Sans on our Windows PC. The same file can look different on another machine.
- Embedded fonts work. With the font file included inside the SVG as base64 data, the text rendered correctly.
- Linked images don't load. An
<image>pointing to a web address showed Chrome's broken-image icon; the same picture embedded as data rendered normally. - Animations and scripts don't run. You get one still frame.
The reliable fix for text is to convert it to outlines before exporting the SVG: in Inkscape, select the text and choose Path → Object to Path (Ctrl+Shift+C); in Illustrator, Create Outlines. For images, embed rather than link them when you save the SVG. Then compare the converter's Result preview with your design.
Other ways to convert
Inkscape (free desktop app)
Inkscape converts with full control over size and DPI. Open the SVG and press Ctrl+Shift+E to open the Export dialog. Choose what to export (the whole document, the page or the selection), set the width and height in pixels or a DPI, choose PNG as the file type and click Export. The background stays transparent unless your document has one.
From the command line, Inkscape exports at 96 DPI by default (one SVG unit becomes one pixel). These options set the size, DPI or a solid background:
inkscape --export-filename=logo.png -w 1024 logo.svginkscape --export-filename=logo.png --export-dpi=300 logo.svginkscape --export-filename=logo.png -w 1024 --export-background=white --export-background-opacity=1 logo.svg
Inkscape uses fonts installed on your computer, so install any web font the SVG names before exporting.
Chrome or Edge
Drag the SVG into a browser tab, press F12, right-click the <svg> element in the Elements panel and choose Capture node screenshot. To get a bigger image, double-click the width and height attributes in the Elements panel and type new values first. In our test of Chrome's screenshot function, the one DevTools uses, the image came out on a white background, not transparent, so use this method only when you don't need transparency.
Frequently asked questions
Is SVG to PNG conversion lossless?
PNG compression itself is lossless, but turning a vector into pixels fixes the resolution. At the size you export it looks the same; enlarging it later loses sharpness. Keep the SVG as your master file.
Why is my PNG tiny?
The SVG declares a small width and height, often 24 or 48, or none at all, which Chrome treats as 150 or 300 pixels. Change the width and height attributes, keeping the viewBox, and convert again.
Can I convert several SVGs at once?
Not with the online converter, which takes one file at a time. For a folder of files, run Inkscape's command line in a loop, one inkscape --export-filename=… file.svg line per file.
Is my file uploaded?
No. The converter draws the SVG on a canvas in your browser and saves the PNG from there.
SVG or PNG for my website?
For logos and icons, SVG is usually better: sharper and often smaller. Use PNG where SVG isn't accepted, such as WhatsApp, most social networks, some email clients and older document editors. Our guide to JPG vs PNG vs WebP covers photos.
Sources: Inkscape 1.4 command-line manual and keyboard reference (inkscape.org); converter behaviour tested in Chrome 151 with the site's code, October 2026.
- #svg to png
- #convert svg to png
- #svg to png high resolution
- #transparent png
- #inkscape export png
- #vector vs raster