THE VECTOR FIELD GUIDE

What is an SVG file?

An SVG file is a vector image written in XML. Learn what SVG is used for, how it differs from PNG and JPG, and how to open, edit and convert it.

By Shahab Uddin · Updated

The short answer

An SVG file is a Scalable Vector Graphics image: a text file written in XML that describes shapes, paths, colors and text. Because it stores geometry instead of pixels, an SVG stays sharp at any size. SVG is a W3C standard, displayed by every modern browser, and widely used for logos, icons, illustrations and cutting-machine designs.

What is inside an SVG

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

This three-line file draws a red circle. Open any SVG in a text editor and you will see similar readable markup.

SVG compared with PNG and JPG

SVGPNGJPG
TypeVectorRasterRaster
Scales without blurYesNoNo
TransparencyYesYesNo
Best forLogos, icons, diagramsScreenshots, graphicsPhotos
Editable as textYesNoNo

What SVG is used for

  • Website logos and icons that must look sharp on every screen.
  • Charts, maps and diagrams.
  • Cricut, Silhouette and laser-cutting designs.
  • Animations and interactive graphics with CSS or JavaScript.

How to open, edit and convert SVG

  • View: drag the file into any browser.
  • Edit code: the free SVG editor on this site.
  • Edit visually: Inkscape (free), Illustrator, Affinity Designer or Figma.
  • Convert to a picture: SVG to PNG or SVG to JPG.
  • Make an SVG from a picture: JPEG to SVG converter.

Sources

Written by Shahab Uddin. Published ; updated . Corrections are welcome through the contact page.

A few useful answers

Before you hit download

Is SVG better than PNG?

For logos and icons, usually yes, because it scales and is often smaller. For photos, no: use JPEG or WebP.

Can SVG files contain viruses?

SVG can include scripts, which browsers run when the SVG is opened directly. Open SVGs from trusted sources, or clean them with the SVG cleaner.

Can I print an SVG?

Yes. Open it in a browser or vector editor and print, or convert it to PDF.

Next, make it useful.