How to use
- Drop an SVG file or click to choose one. You can also paste SVG code copied from a design tool or a web page.
- Pick how to size it: a scale factor (×2, ×4 …), or a width or height in pixels | the other side follows the aspect ratio.
- Choose a transparent or solid background, pick PNG or JPG, and download.
Everything runs in your browser; the SVG file and code are never uploaded.
How the size is determined
SVG is a vector format, so enlarging it does not cause jagged edges. This tool re-renders the SVG at the output size, which means a tiny icon exported at 4,096 px stays perfectly sharp.
| What the SVG contains | Base (1×) size |
|---|---|
width="120" height="80" |
120 × 80 |
Only viewBox="0 0 64 32" |
64 × 32 |
width="200" + viewBox="0 0 100 50" |
200 × 100 (height from the viewBox ratio) |
| No size information at all | 300 × 150 (browser default) |
Values with units use CSS conversions: 1 in = 96 px, 1 pt = 1/72 in, 1 mm ≈ 3.78 px.
Examples
- An icon with
viewBox="0 0 24 24"at scale ×4 becomes a 96 × 96 px PNG. - The same icon with width 512 px becomes 512 × 512 px.
- For high-density (Retina) screens, export at twice the display size. A logo shown at 200 px wide should be saved at 400 px.
Things to watch out for
- External links are not loaded. When an SVG is drawn as an image, browsers block external images, web fonts and scripts for security. If text renders in the wrong font, convert it to outlines in your design tool (Illustrator Create Outlines, Inkscape Object to Path) and export again.
- Text uses fonts installed on this device. If the
font-familyin the SVG is missing, a fallback font is used. - JPG has no transparency. A transparent background saved as JPG is filled with white.
- Sides larger than 8,192 px cannot be created, and anything over 4,096 × 4,096 (about 16.7 million pixels) may fail in Safari on iPhone and iPad.
FAQ
SVG code copied from a web page will not open.
Inline SVG taken from HTML often lacks the xmlns declaration; this tool adds it automatically. If it still fails, look for unclosed tags or code that was cut off.
Can I turn the PNG back into an SVG?
No | a PNG is made of pixels, and changing the extension does not make it a vector. That requires a separate tracing step.
I want to use the PNG as a website icon.
The favicon generator turns it into favicon.ico plus a full set of app icons. To embed an image directly in CSS or HTML, use Image to Base64.