Format reference · .svg

What is an SVG file?

SVG (Scalable Vector Graphics) describes an image as shapes, paths and text instead of pixels. It stays perfectly sharp at any size, is often tiny for logos and icons, and is supported by every modern browser. It isn’t suitable for photographs.

Origin and what is inside an SVG

SVG is an open W3C standard. Version 1.0 was published in 2001 and 1.1 in 2003, which is still the baseline most software targets; newer SVG 2 features are adopted piecemeal by browsers.

An SVG file is plain text written in XML. Open one in a text editor and you’ll see elements such as path, circle and text, with coordinates, colors and gradients. Because it is text, an SVG can be edited by hand, generated by code, styled with CSS and searched like a document.

How SVG “compression” works

SVG has no image compression of its own. Its size depends on how complex the drawing is, not on its dimensions: a logo is the same number of bytes whether it is shown at 16 pixels or across a billboard. Web servers usually compress SVG with gzip or Brotli on the fly, which shrinks it substantially. A pre-gzipped variant, .svgz, exists but is less commonly used.

Design tools often export bloated SVG with editor metadata, hidden layers and coordinates written to many decimal places. Compress SVG removes that clutter and shortens path data at a chosen precision without changing how the image looks at normal settings.

Transparency, animation and scripts

Anything not drawn is transparent, and shapes can have any opacity, so SVG logos sit cleanly on any background. SVG can animate through CSS, built-in animation elements or JavaScript.

That flexibility has a security side: an SVG can contain scripts and links. When an SVG is shown through an HTML image tag, browsers don’t run its scripts, but opening an untrusted SVG directly or embedding it inline can. Pixellin always renders SVGs as images, so scripts inside never run.

Support and limits

All current browsers display SVG, and design tools, office suites and many content systems import it. Yet a lot of places that accept images do not accept SVG: social networks, marketplaces, messaging apps and many upload forms expect a raster file. For those, SVG to PNG renders the drawing at the width you choose, at 1× to 4× scale, with transparency kept. SVG to JPG does the same with a solid background.

Text inside an SVG uses fonts installed on the viewer’s device unless it has been converted to outlines, so it can look different on another machine. SVGs that embed photos as Base64 data lose most of their size advantage.

Use SVG for

  • Logos and brand marks that appear at many sizes
  • Icons and interface symbols on websites and apps
  • Charts, diagrams, maps and illustrations with flat colors
  • A modern favicon.svg alongside an ICO fallback

Avoid SVG for

  • Photographs and realistic images with texture
  • Social media uploads and forms that expect PNG or JPG
  • Untrusted files from unknown sources opened directly in a browser
  • Very detailed artwork, where thousands of paths render slowly

SVG questions

What is the difference between SVG and PNG?

SVG stores shapes that are redrawn at any size, so it never gets blurry. PNG stores a fixed grid of pixels, so enlarging it looks soft or jagged. SVG suits logos and icons; PNG suits screenshots and any image with detail that can’t be described as shapes.

Can I convert a JPG or PNG into an SVG?

Saving a photo “as SVG” usually just wraps the pixels inside an SVG file, which brings no real scalability. True conversion requires tracing the image into shapes, which works for simple logos but not photos. Pixellin converts SVG to raster formats, not the other way around.

Are SVG files safe to open?

SVG files from trusted sources are fine. Because an SVG can include scripts, opening an unknown one directly in a browser tab carries some risk. Displayed through an image tag, as Pixellin does, scripts are not run, so previewing and converting are safe.

Why does my SVG look different in another program?

Usually because of fonts or unsupported features. Text uses fonts installed on that device, and some programs don’t support every filter, mask or newer SVG feature. Converting text to outlines in your design tool, or exporting a PNG, gives a consistent result.

Tools for SVG files

Other formats