what is an svg file

What is an SVG file?

An SVG file is XML markup that describes vector graphics. It scales cleanly, can be styled, and can be inspected as code.

SVG is vector markup

Instead of storing pixels, SVG stores shapes, paths, text, and attributes.

SVG stays sharp when scaled

Vector geometry can render at many sizes without the blur of raster images.

SVG is also code

Because SVG is XML, it should be reviewed and sanitized when it comes from untrusted sources.

Simple SVG file

A small SVG shows how markup becomes an image.

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 96" role="img"><title>Check badge</title><rect width="160" height="96" rx="14" fill="#0e7c66"/><path d="M39 55l18 18 64-64" fill="none" stroke="white" stroke-width="10" stroke-linecap="round" stroke-linejoin="round"/></svg>

What Is an SVG File? FAQ

What opens SVG files?

Browsers, design tools, code editors, and online SVG viewers can open SVG files.

Is SVG better than PNG?

SVG is better for scalable graphics; PNG is better for detailed raster images and screenshots.