01 / Drop
Add your SVGs
Drop files, paste code, or press Ctrl or Cmd V. Many at once is fine.
Free tool
This SVG optimizer makes SVG files smaller by taking out what a browser never draws: comments, editor data, metadata, empty groups and extra digits. Drop one file or a whole folder, see the size before and after, and drag a slider over the picture to check it looks the same. Safe mode is built to keep the look, and a pixel check tells you if it did. It runs in your browser with SVGO, so nothing is uploaded.
Need a custom tool, app or website? Contact us →| File | Before | After | Saved |
|---|
What was taken out
What each step saved
Your SVG files are read and shrunk in this page. Nothing is uploaded.
How it works
01 / Drop
Drop files, paste code, or press Ctrl or Cmd V. Many at once is fine.
02 / Check
Drag the slider over the picture. A pixel check draws both versions and counts any difference.
03 / Save
Save one file, or all of them in a ZIP. A file that cannot get smaller is kept as it was.
Guide
An SVG optimizer makes an SVG file smaller by removing what a browser never draws and writing the rest in fewer characters. This one runs SVGO, an open source SVG optimizer, version 4.1.0, inside your browser. Safe mode only removes things that do not draw, so the picture should stay the same. Stronger mode runs SVGO's full default set, and it can move edges a little. Either way a pixel check draws both versions and tells you if anything moved, and the page also shows the gzipped size, which is what many servers send.
Safe removes the doctype, the XML line, comments, the metadata block, editor data from Inkscape, Sketch and Illustrator, unused namespaces, empty groups and empty attributes. It writes colours and path data shorter and keeps numbers to 8 decimal places, far finer than any screen can show. It keeps ids, classes, shapes and groups as they are. Stronger is SVGO's full default set: it also turns shapes into paths, joins paths, merges groups, moves styles onto elements, drops attributes that only repeat a default and rounds numbers to the places you choose, from 0 to 6. Three places is the default.
Six real SVG files from design work were run through this page in Chrome on 27 Oct 2026. The sizes are what the page showed. Your files will differ, and so will your savings.
| File | Original | Safe | Stronger | Pixel check |
|---|---|---|---|---|
| Illustrator export of an arrow, long numbers | 36.1 KB | 26.8 KB | 15.8 KB | Safe identical. Stronger: 0.238% of pixels differ. |
| Figma export of a wordmark, paths only | 6.14 KB | 4.00 KB | 3.79 KB | Safe: 27 of 161,792 pixels differ, by at most 8 of 255. Stronger: 0.893%, up to 62. |
| Figma export with blur filters | 2.17 KB | 2.10 KB | 2.04 KB | Identical in both. |
| Figma export with a PNG picture inside | 108.9 KB | 108.9 KB | 108.8 KB | Safe identical. Stronger: 3.933% differ, up to 255. |
| Figma export with a drop shadow filter | 204.1 KB | 203.7 KB | 203.4 KB | Safe identical. Stronger: 0.878% differ, up to 255. |
| Page capture that holds HTML (foreignObject) | 347.8 KB | 344.1 KB | 342.2 KB | Not possible, see below. |
What this shows. The arrow came from Illustrator with numbers like 227.000000, and it shrank the most: 25.7% in Safe and 56.2% in Stronger. The Figma files were already compact, so they saved from 0.0% to 6%, and the picture inside the fourth file cannot shrink at all. In the page's own pixel check, Safe found no difference in four files and a tiny one in a fifth, the sixth could not be checked, and Stronger changed the picture in four of the five that could be checked, at the edges of shapes. A second check in Chrome drew each original and each result at 800 by 800 pixels and compared them with an image library: Safe was identical for all six, and Stronger differed in four, by 52 to 7,851 of 640,000 pixels, the largest difference being 26 to 69 out of 255. These are small edge shifts, but they are real, which is why Safe is the default and the page shows the check every time.
The page cannot read the pixels of an SVG that holds HTML, because the browser blocks it, so for that last file it says so and leaves the comparison to the slider. In the Chrome check that file looked identical after both modes.
Many servers send SVG gzipped, and gzip likes repeated text. The page shows both sizes. On the arrow, Safe made the file 25.7% smaller, but its gzipped size went from 10.7 KB to 12.2 KB, because shorter path data repeats less. Stronger brought it down to 7.29 KB. If your server compresses SVG, read the gzip line and not only the first number.
Keep ids as they are is on by default, because CSS or JavaScript outside the file may point to an id, and shortening it would break that link. If nothing outside the file uses them, turn it off in Stronger: on the logo that took the result from 1,587 to 1,319 bytes. Keep title and description is also on by default, since screen readers read them. Turn it off only for a purely decorative picture.
If you place the SVG inline in a web page, its style rules can affect the rest of the page, and the page's CSS can reach into it. Check the result in the page itself before you replace the old file.
Tick Remove width and height, keep the viewBox when the SVG should fill whatever space the page gives it, as an icon in a button does. SVGO then drops the width and height of the outer element and keeps or adds the viewBox. Without a viewBox the browser has no size to scale from, so check the result in your page. Copy as CSS data URI gives a value like url("data:image/svg+xml,...") with the code inside, for a background-image rule, with only the characters that need it escaped and double quotes turned into single ones.
If the pixel check shows a difference you can see, press Use the Safe result for this file, or raise the decimal places in Stronger. If the browser cannot draw a file, it is probably not valid SVG. Files over 20 MB are skipped. To turn a picture into SVG first, use image to SVG, and to turn an SVG into a PNG use SVG to PNG.
Questions
Drop it on this page, keep Safe selected and download the result. Safe removes comments, editor data, metadata and empty groups and writes numbers shorter, so the picture stays the same.
Safe is built to keep the look. The page draws the original and the result in your browser and compares every pixel, so you see the result for each file. In six real files it found Safe identical in four, 27 of 161,792 pixels off by at most 8 of 255 in one, and could not check the sixth. Stronger changed the picture at the edges in four of the six, and the check tells you how many pixels for your file. The button next to the check switches that file to Safe.
It depends on the file. Exports from Inkscape or Illustrator carry the most extra data. In the six real files above, Safe saved from 0.0% to 34.9% and Stronger from 0.0% to 56.2%.
No. SVGO runs in a worker in this page, and your files stay in your browser.
SVGO is an open source SVG optimizer under the MIT licence. This page uses version 4.1.0, served from this site, and does not change its code. The licence file in the project was read on 27 Oct 2026, and the bundle's other parts (css-tree, csso, css-select, css-what and sax) have licences listed beside it that allow this use.
It may already be as small as SVGO can safely make it, or most of it may be a picture inside the file, like the Figma export with a PNG inside above, where only 9 bytes could go. When SVGO cannot make the file smaller, the page returns your original and says so.
Yes. Drop them together or use Add more files. Each gets its own size, picture and pixel check, and Download all as a ZIP saves them together.
Gzip works by finding repeated text. Safe rewrites path numbers in a shorter form that repeats less, so a file can be smaller as plain text and a little bigger once gzipped. The page shows both, so you can pick the one that matches how your server sends the file.
Keep them if CSS, JavaScript or another file refers to them, and in doubt. Turn the option off in Stronger only when nothing outside the SVG uses its ids.