PNGifier

What Is an SVG File?

SVG (Scalable Vector Graphics) is a W3C standard, first published in 1999, that describes images as XML text. Instead of storing pixels, it stores the maths for shapes like paths, rectangles, circles, and text — so the image redraws crisply at any size. That makes it perfect for logos, icons, illustrations, and charts.

By Published

What does SVG stand for and what makes it different?

SVG stands for Scalable Vector Graphics. Unlike a raster format such as PNG or JPG — which stores a fixed grid of coloured pixels — an SVG is a vector format written in plain XML text. It records the geometry of an image: the paths, rectangles, circles, and text that make it up, along with their colours and positions. The browser reads those instructions and draws the picture on the fly, so the file holds a recipe rather than a photograph of the result.

Why does SVG scale perfectly at any size?

Because an SVG is calculated from maths rather than stored as fixed dots, it can be drawn at any size with zero quality loss. The same file renders razor-sharp as a 16-pixel favicon and as a wall-sized poster, with no blur or jagged edges. For simple graphics the file is often tiny too, since a few lines of XML can describe a shape that would take thousands of pixels to store as a raster image.

What is SVG good for?

SVG shines for logos, icons, illustrations, and charts — anything built from clean shapes and flat colour. Because it is code, you can edit it in a text editor, style and animate it with CSS, and inline it directly in your HTML. When you need a fixed-pixel version for an app, email, or social platform that doesn't support vectors, you can convert SVG to PNG.

Can SVG handle photographs?

Not really. A photo is millions of subtly different pixels, and describing every one of them as a shape would make the SVG enormous or simply impractical. For photographs, stick with a raster format. If you're weighing the two approaches, see PNG vs SVG, or read what is a PNG for the raster side of the story.

Is SVG safe to use?

For your own graphics, yes. But because an SVG is code, it can contain scripts that run when the file is opened in a browser. That makes untrusted SVGs from unknown sources a genuine security consideration — they should be sanitised before display. Files you create or export from trusted tools carry no such risk.

Frequently asked questions

Can I open an SVG in a text editor?
Yes. An SVG is just XML text, so you can open it in any code or text editor and read or edit the shapes, colours, and coordinates by hand.
Does an SVG ever lose quality when resized?
No. Because an SVG is drawn from mathematical instructions rather than fixed pixels, it stays perfectly sharp at any size, from a tiny favicon to a billboard.
Should I use SVG for photographs?
No. SVG describes shapes, not millions of individual pixels, so photos become enormous or impossible to represent. Use PNG, JPG, or WebP for photographs.
Do all browsers support SVG?
Yes. Every modern browser renders SVG natively, and you can even paste the markup directly into your HTML to inline it.