What Is an SVG File?

An SVG file is an image stored as shapes instead of pixels, so it stays sharp at any size. Here is what that means, how it compares with PNG and JPG, and how to open, make or convert one.

What does SVG stand for?

SVG stands for Scalable Vector Graphics. It is an open standard from the World Wide Web Consortium (W3C), first published in 2001, and every modern web browser can display it. The files end in .svg.

The important word is vector. A PNG or JPG stores a grid of colored pixels. An SVG stores a list of shapes: lines, curves, circles and outlines, each with a color. When you make an SVG bigger, the shapes are simply drawn again at the new size, so the edges stay crisp.

What's inside an SVG file

An SVG is plain text. Open one in a text editor and you will see something like this, which draws a violet circle:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
  <circle cx="50" cy="50" r="40" fill="#7c5cff" />
</svg>

Because it is text, an SVG can be edited by hand, styled and animated with code, searched, and compressed very well. A simple logo is often just a few kilobytes.

SVG vs PNG

SVGPNG
StoresShapes and curves (vector)Pixels (raster)
EnlargingStays sharp at any sizeBlurs or turns blocky
Best forLogos, icons, lettering, line art, cut filesScreenshots, detailed artwork, photos with transparency
TransparencyYesYes
EditingChange each shape and color separatelyEdit pixels
Where it worksBrowsers, design apps, cutting machines; not most social networksAlmost everywhere
png to vector
Zoomed in four times: the PNG on the left shows its pixels, the SVG on the right keeps clean edges.

In short: if the image is made of clear shapes and needs to look good at more than one size, use SVG. If it is a photo or full of fine detail, keep it as a PNG. Have a PNG you'd like as a vector? Convert PNG to SVG.

SVG vs JPG

JPG is built for photographs. It makes files small by throwing away detail, which is invisible in a photo but leaves fuzzy halos around the sharp edges of a logo or text. JPG also has no transparency, so there is always a background. SVG has neither problem, but it can't store a photograph as efficiently as a JPG. Logos and graphics belong in SVG; photos belong in JPG. To change one into the other, use JPG to SVG or SVG to JPG.

How to open an SVG file

Need it in a format that opens anywhere, like a document or a social post? Convert the SVG to PNG at the size you need.

How to make an SVG file

There are two ways to get one:

Questions

Is an SVG file a vector?

Yes. SVG is a vector format: it describes shapes with points and curves, not a grid of pixels. That is why it can be scaled up without blurring.

Is SVG better than PNG?

For logos, icons, lettering and other flat graphics, usually yes: an SVG stays sharp at any size and is often a smaller file. For photographs and screenshots, PNG or JPG is the better choice.

Can an SVG file contain a photo?

It can. An SVG may hold an embedded PNG or JPG, but that part is still made of pixels and blurs when enlarged like any other photo. To make a picture truly scalable, it has to be traced into shapes, which is what our image to SVG converter does.

Is it safe to open an SVG file?

Viewing an SVG as an image is safe. Because SVG is a text format that can include scripts, some websites don't accept SVG uploads, and it is wise to open SVG files from unknown senders as an image rather than as a web page.

How do I turn an SVG into a PNG or JPG?

Use our free SVG to PNG or SVG to JPG converter. Pick any size, and it runs in your browser, so nothing is uploaded.