SVG File Format Explained

Scalable Vector Graphics · .svg

Extension.svg
MIME typeimage/svg+xml
TypeImages
Developed byW3C
First released2001
Royalty-freeYes
CompressionNone

What is an SVG file?

SVG is an XML-based vector image format standardized by the W3C. Instead of pixels it stores shapes, paths, text and gradients as instructions, so a logo renders razor-sharp at any size, from a favicon to a billboard, and the file is often just a few kilobytes. Because it is text, an SVG can be edited by hand, styled with CSS and animated with JavaScript.

The same flexibility is its weakness. Photographs cannot be expressed as shapes, complex illustrations can become heavy and slow, and because an SVG can contain scripts and external references, many platforms sanitize or reject uploaded SVG files. Raster copies are still needed for e-mail, social media and print workflows.

When SVG is the right choice

Strengths

  • Infinitely scalable: sharp on any screen and at any print size
  • Tiny files for logos, icons, diagrams and charts
  • Editable text format that can be styled and animated on the web

Limitations

  • Unsuitable for photos; detailed artwork gets large and slow
  • Rejected by many upload forms because it can carry scripts
  • Rendering differs slightly between browsers and editors

How to open an SVG file

Any browser displays an SVG; Inkscape, Illustrator, Figma and Affinity Designer edit it. Windows Explorer and many viewers show only a generic icon, so for a quick preview or a version to paste into a document convert it with SVG to PNG.

How to convert an SVG file

SVG to PNG produces a raster with transparency for documents, presentations and social media, SVG to JPG a flat photo-style copy, and SVG to ICO a Windows icon. Tracing a bitmap back into vectors is possible for simple graphics with PNG to SVG.

Frequently Asked Questions

Why does my SVG look blurry when converted to PNG?

The PNG was rendered at a small pixel size. Vectors have no inherent resolution, so choose a larger output width when converting; the result stays sharp up to that size.

Can I convert a photo to SVG?

Only by tracing, which turns areas of similar colour into shapes. It works for logos, silhouettes and simple drawings; a photograph becomes either a huge file or a posterized approximation.

Is SVG safe to upload?

An SVG can contain JavaScript and external references, which is why platforms sanitize or block it. Files exported from design tools are normally clean; treat SVGs from unknown sources like any downloaded file.

Does SVG support animation?

Yes, through SMIL elements, CSS animations or JavaScript. Browsers play them; most image editors and converters render only the static first state.