SVG vs PNG: when to use each
SVG and PNG often appear in the same conversations — logos, icons, screenshots, "which file do I send the printer?" — but they store pictures in opposite ways. SVG describes shapes, text and colours as markup, so the drawing can be resized without going soft. PNG stores a fixed grid of pixels, with optional transparency, and almost every app can open it.
The useful question is not which format is better in the abstract. It is which one the destination can use, and whether you still need an editable original. This guide walks through that choice, and when it is worth converting an SVG to a PNG.
How the two formats store a picture
An SVG (Scalable Vector Graphics) file is text. A circle is a centre, a radius and a fill; a letter can remain a real character in a <text> element. You can open the file in a text editor, change a colour, and the picture updates. Because the browser or design tool draws the shapes at the size you ask for, a 24 px icon and a 2,400 px banner can come from the same file.
A PNG (Portable Network Graphics) file is a bitmap. It records a colour (and, optionally, an opacity) for every pixel in a rectangle. The format is lossless: saving a PNG does not add the smudging you see with JPEG. But the grid is fixed. Enlarge a 200 × 200 px PNG to fill a poster and the edges stair-step or blur. Shrink a huge PNG to a favicon and you are throwing away work the file still has to carry.
That difference drives almost every practical decision below.
A side-by-side comparison
| Feature | SVG | PNG |
|---|---|---|
| What it stores | Shapes, text, strokes, effects as markup | A fixed pixel grid, optionally with an alpha channel |
| Scaling | Sharp at any size | Sharp only at or below its own pixel size |
| Typical file size | Small for logos and icons; can grow with thousands of path points or embedded images | Small for simple graphics at modest sizes; large at print resolution or for photos |
| Transparency | Unpainted areas, opacity, masks | Yes, per-pixel alpha, including partial transparency |
| Editable later | Yes, in a [vector editor](/editor) or as code | Only as pixels, unless you still have the SVG |
| Text | Can stay selectable and accessible | Flattened into pixels |
| Animation | Possible with CSS or SMIL, with uneven support | APNG exists but support is patchy; PNG is usually a still image |
| Where it works | Modern browsers; many design tools | Almost everywhere, including email, office apps, social networks and print labs |
When to use SVG
Use SVG as the working file and, in many cases, as the file you ship, when the picture is made of shapes:
- Logos and wordmarks, so the same asset can sit in a 16 px favicon and a 4-metre sign without redrawing it.
- Icons and UI on a website or in an app, especially if you want to change colour with CSS (
currentColor, or a simplefill). A small icon set is often far lighter as SVG than as a PNG sprite at 2× and 3×. - Charts, diagrams and simple illustrations that may need a label or colour tweak later.
- Graphics that must stay sharp on high-density screens. You do not need a
@2xand@3xraster if the browser can draw the vectors.
SVG also keeps text as text, which helps accessibility and search when the file is inlined in a page. If the lettering has been converted to paths, that advantage is gone, but the result still scales.
There are limits. Photographs and scans should not be "saved as SVG" by embedding a bitmap: the result is still a bitmap, with SVG wrapping. Very busy illustrations with tens of thousands of nodes, or heavy filters, can be slower and heavier as SVG than as one well-sized PNG. And SVG is XML: inline markup can contain scripts, so treat files from untrusted people the way you would treat HTML. SVGs referenced with <img> or as a CSS background do not run scripts, which is safer for user-supplied icons.
When to use PNG
Use PNG when the destination cannot take a vector file, or when the picture is already a photograph of pixels:
- Email signatures and newsletters. Gmail and several versions of Outlook do not display SVG at all. A PNG of the logo, exported at twice the width it will be shown (for a 200 px-wide signature, export 400 px), is the reliable choice.
- Social networks and link previews. Platforms generally reject SVG uploads, and Open Graph images need to be PNG or JPEG (1,200 × 630 px is the usual link-preview size).
- Documents and slides. Recent Microsoft 365 apps can insert SVG, but older Word and PowerPoint, plus Google Docs and Google Slides, want a bitmap. A transparent PNG at 2× to 4× stays sharp on a full-screen slide.
- App stores and some home-screen icons. The Apple App Store asks for a 1,024 × 1,024 px PNG with no alpha channel. Android and web app icons are also specified as PNG at fixed sizes.
- Screenshots, photos and UI captures, where there is no vector original.
- Print shops and photo labs that asked for a raster file. In that case the pixel size has to match the physical print; see how to convert SVG to PNG for print.
PNG's transparency is a genuine advantage over JPEG, which has no alpha channel. Use PNG (or WebP) when you need a sharp graphic with a transparent background; use JPEG or WebP for photographs where a little compression is acceptable and the file would otherwise be huge.
Browser, app and email support
In current Chrome, Edge, Firefox and Safari, SVG works as inline markup, as an <img>, and as a CSS background. SVG favicons work in those browsers too, though you should still ship PNG fallbacks (at least 32 × 32, and an .ico if you still care about older environments).
The gaps are almost all outside the browser:
- Email is the big one. Apple Mail is generally fine with SVG; Gmail and a lot of Outlook are not. If a logo has to survive a journey through unknown clients, send PNG.
- Office and Google editors, as noted above, are inconsistent. PNG is the compatibility layer.
- Social uploads and Open Graph require raster images.
- Embedded webviews in older apps occasionally lag behind. If you do not control the client, have a PNG ready.
This is also why a website can happily use SVG for its header logo, and still need a PNG of the same logo for the newsletter and the social card. They are not competing files; they are the same artwork in the formats each channel accepts.
File size is not a rule of thumb
A simple logo as SVG is often a few kilobytes, and smaller than a retina PNG of the same mark. That comparison flips when:
- The SVG is an export from a design tool that left unused symbols, metadata and extremely precise coordinates in the file. Running it through an SVG optimizer usually helps.
- The "SVG" actually embeds a full-resolution PNG, which is common in traced files that were never cleaned up.
- You need a print-resolution PNG (an A4 page at 300 DPI is 2480 × 3508 px). That file is large because it has to be; the SVG original of the same page may still be tiny.
Compare the actual files for your asset, at the size you will use, rather than assuming one format is always lighter.
Colour, typography and motion
SVG can be recoloured at runtime: a monochrome icon using currentColor follows the surrounding text colour, which is awkward to do with a set of PNGs. Multi-colour marks are easier to edit as SVG too, either in a visual editor or by swapping fills in the colour changer.
Type is the other fork. In an SVG, live text can be selected, translated and referenced by assistive technology; it also depends on the font being available (installed, or embedded as a @font-face inside the file). Once you convert to PNG, the letters are pixels: they will not be mis-fonted, and they will not be selectable either. If you need a PNG of type, convert the text to outlines in the editor first, or embed the font, so the converter does not fall back to a different typeface.
Treat animation cautiously. SVG can be animated with CSS, and some browsers still support SMIL; both are unreliable in email and older webviews. A PNG is a still frame. For motion on the web, a short video or a tested CSS animation is usually more predictable than an animated SVG or APNG.
When to convert, and when not to
Convert SVG to PNG when the next step in the chain cannot use SVG: a print file at a chosen DPI, an email logo, a social image, an app-store icon, a slide deck. Do it at the exact pixel size you need, or at 300 DPI for print, rather than exporting one giant PNG and shrinking it in every app. The SVG to PNG converter runs in your browser — nothing is uploaded — and can export one file or a batch, with a transparent or solid background.
Do not convert "just in case" and then throw away the SVG. The PNG is a snapshot. You will want the vectors the next time the colour, the wording or the size changes.
Convert PNG to SVG only by tracing, and only when you accept an approximation: a clean logo on a flat background traces reasonably well; a photograph does not. A PNG wrapped in an <image> inside an SVG is still a PNG.
If you are unsure, keep SVG as the master, and derive the PNG for the specific place it is needed. That is the habit that saves a Friday afternoon when someone asks for "the same logo, but 2,000 pixels, on a navy background, and also for A6 flyers."
For the print-specific arithmetic — the DPI formula, A5/A4 pixel sizes, transparency on a press, and bleed — continue with how to convert SVG to PNG for print.