Glossary · Operating Systems & Software

SVG (Scalable Vector Graphics)

SVG is an XML-based vector image format that stays sharp at any size and can be styled, scripted, and edited as text.

Updated October 6, 2026

SVG (Scalable Vector Graphics) is an image format that describes shapes, paths, and text with XML instead of pixels. Browsers render it at any size without blurring.

Why it matters

SVG is ideal for logos, icons, charts, and illustrations because the file is small and sharp on every screen density. Because it is text, you can change colors with CSS, animate it, and compress it with gzip. It is a poor fit for photographs.

SVG files can contain scripts, so only accept uploads from trusted sources or sanitize them.

Example

<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
  <circle cx="24" cy="24" r="20" fill="#2563eb"/>
</svg>

This draws a blue circle that scales to any width.

Common mistakes

  • Allowing untrusted SVG uploads without sanitizing, which can carry scripts.
  • Using SVG for photos, producing huge files.
  • Leaving out the viewBox, so the image will not scale properly.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.