File Format Guide

What is an SVG file?

An SVG is not a picture — it is a set of drawing instructions. That single difference is why an SVG logo stays razor sharp at any size, why you can edit one in a text editor, and why it is a poor fit for photographs.

SVG at a glance
What is an SVG file?
An XML-based vector image format. Instead of pixels, it uses mathematical formulas to draw shapes, meaning it can be scaled infinitely without losing quality.
How to open an SVG file?
Web browsers, code editors (as raw text), and vector graphic software like Adobe Illustrator or Figma.
Typical use of an SVG file:
Website icons, logos, UI elements, and simple illustrations that need to look sharp on any screen resolution (including Retina/4K displays).
Origin of the SVG file:
Developed by the World Wide Web Consortium (W3C) in 1999.
Modern alternatives for SVG:
None. SVG remains the absolute standard for vector graphics on the web.
SVG specifications
Full name Scalable Vector Graphics
File extensions .svg, .svgz (gzip-compressed)
MIME type image/svg+xml
Type Vector — XML-based markup, not a pixel grid
Compression None inherently; plain text, compresses very well with gzip
Transparency Supported
Animation Supported via CSS, SMIL, or JavaScript
Resolution Resolution-independent — renders sharp at any size
Introduced 1999 (W3C; version 1.0 recommendation in 2001)
Browser support Universal
Advertisement

A file made of instructions, not pixels

Open an SVG in a text editor and you will find readable XML: a circle at these coordinates with that radius, a path following this sequence of curves, filled with this colour. Nothing in the file specifies a resolution. The renderer works out the pixels fresh every time it draws, which is why the same file is crisp on a phone, on a 5K monitor, and on a billboard.

It also means the file size depends on the complexity of the drawing rather than on its dimensions. A simple icon is a few hundred bytes whether it is displayed at 16 pixels or 1600. A detailed map traced from a photograph, by contrast, can run to megabytes of path data and render more slowly than an equivalent PNG.

Editable in ways raster images are not

Because the file describes shapes, you can restyle it after the fact. Change a fill colour with one text edit, or leave the colour unspecified and let CSS set it — this is how icon systems make a single icon file adapt to light and dark themes without shipping two copies.

It also means SVG carries whatever the exporter put in it. Design tools routinely leave behind editor metadata, hidden layers, and enormous numbers of decimal places in coordinates. Running an SVG through an optimiser before shipping it often cuts the size by half without changing a pixel of the output.

SVG is code, so treat it like code

An SVG can contain <script> elements and event handlers. When it is displayed as an image — inside an <img> tag or as a CSS background — browsers refuse to run that script, so it is inert. When it is inlined directly into a page's markup, the script becomes part of that page.

The practical rule: never inline an SVG you did not create or sanitise, particularly one uploaded by a user. This is a genuine and regularly exploited attack path, and it is the one meaningful downside of a format that is otherwise entirely benign.

Converting SVG files

Converting SVG to PNG rasterises it at a size you choose, which is what you want for email signatures, social media, print shops, and any software that cannot read vectors. Pick the target dimensions deliberately — the whole point of the conversion is that you are freezing the resolution, so export at the largest size you will need.

Converting the other way, from PNG or JPG to SVG, is not really the same operation. It requires tracing, which approximates the image with paths. That works well for a black-and-white logo and badly for a photograph, where the result is usually a huge file that looks like a poor watercolour of the original.

Convert SVG files in your browser

Zolvo's image converter runs entirely on your own machine — your files are never uploaded to a server. Drop a SVG file in and pick an output format, or jump straight to a common one:

SVG — frequently asked questions

Can I convert a photo to SVG?

Not meaningfully. Converting a raster image to SVG requires tracing the pixels into shapes, which suits flat, high-contrast artwork like a logo. Applied to a photograph it produces an enormous file that looks like a posterised approximation of the original.

Why does my SVG look wrong in some programs?

SVG is a large specification and support varies. Filters, blend modes, embedded fonts, and clipping paths are the usual culprits — browsers handle them well, while some editors and print workflows do not. Converting text to outlines before export solves the most common case, missing fonts.

Are SVG files safe to open?

Viewing one in a browser or image viewer is safe, because scripts inside an SVG do not run when it is displayed as an image. The risk arises only when an SVG is inlined into a web page's markup, where any embedded script becomes part of that page. Do not inline SVGs from untrusted sources.

How do I make an SVG a specific pixel size?

Convert it to PNG at the dimensions you need. The SVG itself has no fixed pixel size — it renders at whatever size it is asked to — so exporting a raster copy is the way to pin it down.

Related formats