File extensions

How to open a .svg file

Scalable Vector Graphics · Vector graphic

An .svg file is a vector image written in XML. Every browser displays it, so dragging it onto a browser window works instantly. To edit it, use Inkscape; to read the code, any text editor.

What a .svg file actually is

SVG is an open W3C standard and, unusually for an image format, it is text. Open one in an editor and you see XML describing shapes, paths and colours rather than a grid of pixels.

Being vector, it stays sharp at any size, which is why it is the standard for logos and icons on the web. Being text, it compresses well and can be edited by hand or generated by code.

Why it will not open

Windows Photos handles SVG inconsistently and older versions do not preview it at all, so double-clicking may open the wrong application or nothing. The file is almost never the problem.

Renaming it to an extension you can open will not help: changing the extension does not convert the file, it only changes what Windows tries to open it with.

Step by step

Windows

  1. 01Fastest view: drag the file onto any browser window. Chrome, Edge and Firefox all render SVG natively.
  2. 02To edit: install Inkscape, which is free and made for exactly this.
  3. 03To read or tweak the code: open it in VS Code or Notepad++, where the XML is plain and editable.
  4. 04To convert to PNG at a specific size, open it in Inkscape and use File, Export.

macOS

  1. 01Preview and Safari both display SVG. Double-clicking usually works.
  2. 02Install Inkscape for editing, or open it in any text editor to see the markup.

What usually goes wrong

An SVG can contain scripts

Because SVG is XML, it can embed JavaScript. That is harmless when the file comes from a source you trust and is a genuine risk with one that does not. Opening an untrusted SVG in a text editor first, rather than a browser, costs nothing.

Programs that open .svg

Our pick, in order. Every one links to the publisher's official download URL and the SHA-256 hash of the installer. Once you have downloaded it, you can check the file against our index before you run it.

If you end up downloading one of these from somewhere other than the publisher, what you can and cannot verify about that is worth two minutes.

Also registers .svg in its manifest

Taken straight from publisher manifests. Some of these handle the format for a narrow purpose rather than as their main job.

Common questions

How do I open an SVG file on Windows?
Drag it onto a browser window; Chrome, Edge and Firefox all render SVG natively. For editing use Inkscape, and to see the underlying XML open it in any text editor.
How do I convert an SVG to PNG?
Open the file in Inkscape and use File, Export, choosing the pixel dimensions you want. Because SVG is vector, you can export at any resolution without losing quality.

Related formats