FILE FORMAT GUIDE

SVG File (.SVG): XML Graphics, MIME & Safe Inspection

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.

Check supported header evidence locally. Identification is not file validation or a malware scan.

Analyze a file locally

Quick facts

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

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.

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

How to open SVG

SVG decoding can invoke delegates and process external references depending on the build and policy; use a restricted environment and review ImageMagick policy before inspecting untrusted content.

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

Things to check

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

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

Fact review: 2026-09-19. Unknown fields are not inferred from the file extension.