SVG Lab

5 November 2026 · Usman Bashir

How to make an SVG file smaller (measured on a real file)

To make an SVG file smaller, run it through SVGO (or SVGOMG, its browser version), set the number precision to 1 or 2 decimals, and serve it gzipped. On a real traced logo, SVGO took 5,647 bytes to 2,721 at precision 2 and 1,866 at precision 1, with no change you can see. Precision 0 got it to 996 bytes, but it bent the thin feather tips. Here is the test, the settings, and where each step stops paying.

Four renders of the same traced eagle logo that look identical, labelled 5,647 bytes as traced, 2,721 bytes at SVGO precision 2, 1,866 bytes at precision 1 and 996 bytes at precision 0.
The same traced logo at four sizes. Input: a VTracer trace of a 716-byte logo, made with SVG Lab's Auto-trace settings. SVGO 4.0.0, multipass, default preset, measured 3 November 2026.

What makes an SVG file big?

An SVG is text, so every character costs a byte. Four things usually fill it up. Editors and tracers leave comments, version tags and their own data behind. Numbers carry more decimals than any screen can show: our trace placed a shape at 253.75001525878906, fourteen decimals for a position on a 512-unit drawing. Paths are written the long way, with absolute coordinates and a command letter repeated for every curve. And traced or exported art can hold far more points than the shape needs, or a whole PNG pasted inside as base64 text. The first three are what SVGO removes without touching the look. The last one needs a better source file.

How do I shrink an SVG with SVGO?

SVGO is the free, open-source optimizer that many SVG tools build on. SVGOMG (svgomg.net) is the same engine in a web page, with a live preview and a precision slider. For one file, use SVGOMG. For a folder or a build step, use the command line:

npx svgo logo.svg -o logo.min.svg --multipass -p 2
  1. Open SVGOMG, or run the command above in your project folder.
  2. Load your SVG and keep the default plugins on.
  3. Set the precision to 2, then try 1.
  4. Compare the result with the original at 400 percent.
  5. Save the smaller file and upload it.
The first shape of the traced SVG before and after SVGO: before, an XML header, a generator comment and long absolute curves; after, one line with relative commands and one decimal.
What SVGO actually removed from the trace: the header and comment, the version tag, the long transform, and repeated command letters.

How low can the precision go before the SVG looks wrong?

Precision is the number of decimals SVGO keeps, counted in the drawing's own units. That is why one setting does not fit every file: on our 512-unit logo shown at 512 pixels, one decimal is a tenth of a pixel, while on a 24-unit icon the same decimal is far coarser. We rendered every version at twice its size and counted the pixels that differ from the original trace. Precision 1 changed 311 pixels, all on edges. Precision 0 changed 4,078, and at 6x zoom you can see the lower feather tip close up and lose its point.

Six-times zoom of the lower feather tips in each version: the trace, precision 2 and precision 1 look the same, while precision 0 makes the light gap narrower and pointed.
Precision 2 and 1 hold the shape. Precision 0 saves another 870 bytes but bends the thin tips.

The rule we use: start at 2, drop to 1 if it still looks right zoomed in, and only use 0 on shapes that sit on whole numbers anyway, like pixel icons.

Does gzip make an SVG smaller?

Gzip makes the download smaller, not the file. Most web servers can compress text on the way out, and SVG compresses well because it repeats itself. Our 5,647-byte trace travels as 2,531 bytes gzipped; the SVGO version at precision 1 travels as 960. So the two steps stack: optimize the file once, then make sure it is sent compressed. To check, open the browser's network tab, click the SVG and look for Content-Encoding: gzip or br in the response headers.

Bar chart of file size and gzipped size: as traced 5,647 and 2,531 bytes, precision 3 3,703 and 1,749, precision 2 2,721 and 1,375, precision 1 1,866 and 960, precision 0 996 and 551.
Raw and gzipped bytes for every version of the test logo.

Why is my traced SVG so big, and what fixes it?

A trace rebuilds a picture from pixels, so it stores the outline as many short curves. Our trace is 5,647 bytes; the hand-made logo it came from is 716. Even the most aggressive SVGO pass, precision 0, stopped at 996 bytes, still bigger than the original and already damaged. Optimizing cleans up a trace; it cannot turn it back into a drawing. Two things help more. In the tracer, try a lower detail setting first: SVG Lab's Auto-trace shows the path count and the size in KB in its preview before you place anything, so you can compare. And when you need a new icon or logo rather than a copy of a PNG, have it drawn as vector shapes from the start. That is what the SVG Lab MCP does: the AI you already use draws icons and illustrations through SVG Lab's Design Engine as real vector shapes (here is a logo made that way).

Can SVG Lab make my SVG file smaller?

Not directly. SVG Lab (svglab.app) has no optimizer today: its old optimizer page now redirects to the SVG to Base64 converter. Use SVGO or SVGOMG for the file, and SVG Lab for the drawing itself: the editor for hand edits and Auto-trace, and the SVG Lab MCP with its Design Engine when you want an AI to design icons, illustrations and app screens for you.

How we checked

Frequently asked questions

What is the fastest way to make an SVG file smaller?

Paste it into SVGOMG (svgomg.net), the browser version of SVGO, set the precision to 2 and download the result. On a real traced logo that cut 5,647 bytes to 2,721, about half, with no visible change.

What precision should I use in SVGO?

Start at 2, then try 1 and compare the two zoomed in. Precision counts decimals in the drawing's own units, so a 512-unit logo takes precision 1 well, while a 24-unit icon may need 2 or 3. Precision 0 saved the most on our test logo but bent its thin feather tips.

Does SVGO change how my SVG looks?

At precision 1 or 2, not visibly: on our test logo only 311 pixels of a 1,024-wide render changed at precision 1. At precision 0, 4,078 pixels changed and thin points moved. SVGO also drops comments, editor data and unused attributes, which never show.

Does gzip make an SVG file smaller?

Gzip shrinks what the server sends, not the file on your disk. Our 5,647-byte trace went over the wire as 2,531 bytes gzipped, and the 1,866-byte SVGO version as 960. Do both: optimize the file, then check the response shows Content-Encoding in the browser's network tab.

Does SVG Lab have an SVG optimizer?

No. SVG Lab (svglab.app) retired its optimizer page, which now sends you to the SVG to Base64 converter, so use SVGO or SVGOMG. SVG Lab's Auto-trace does show the path count and the size in KB before you place a trace, so you can compare settings first.

Draw icons as vectors with the SVG Lab MCP