FILE FORMAT GUIDE

SVG File: What It Is & How to Open It

An SVG file is an XML document that describes two-dimensional vector and mixed vector/raster graphics. It can include styling, animation, links and scripts.

Quick facts

Extension
.svg
Format
Scalable Vector Graphics
Category
image
MIME type
image/svg+xml
Standard / developer
W3C
Open with
Web browser

What is SVG?

SVG is a graphics language rather than a fixed raster pixel array. Because SVG can reference external resources and contain active content, viewing an untrusted file is a different security decision from reading inert text.

How to open SVG

SVG can contain links, scripts or external resources. Use a current browser and be cautious with files from unfamiliar sources.

Web browserWindows / macOS / Linux

Drag the SVG into a current browser to view it. Use Inkscape or another vector editor to inspect and edit the drawing rather than changing the XML blindly.

SVG — MDN Web Docs

Common uses and compatibility

  • Publish scalable icons, diagrams and illustrations that can be styled or embedded on the web

Things to check

  • SVG may contain scripts or reference external resources, so untrusted files require a restricted inspection workflow.

Advanced inspection

These developer and command-line workflows inspect structure or metadata. They are not the default way most people open the file.

ImageMagick identifyCommand-line tool

First run magick identify -list format and confirm SVG read support in this installation. Then run magick identify -verbose -- image.svg in a restricted environment to inspect characteristics without overwriting the source.

Technical details

Signature
No registered magic number
Encoding
XML encoding rules; UTF-8 is the default when no higher-level protocol or encoding declaration overrides it
Container
Not applicable
Compression
Base SVG is XML; a gzip-compressed SVG variant conventionally uses the .svgz extension

Scalable Vector Graphics (SVG) 2

Related formats

  • Portable Network Graphics

    PNG stores raster pixels in a binary chunk format, while SVG describes vector and mixed graphics with XML.

  • WebP Image

    WebP stores raster or animated image data in a RIFF container, while SVG is an XML graphics language that can include scripting and external references.

  • Extensible Markup Language

    SVG is an XML language with SVG-specific elements and rendering semantics.

Sources & review

Sources reviewed 2026-09-19.