Make SVG files smaller: strip editor data and comments, shorten paths and numbers
Processed in your browser. Nothing is uploaded. Checked against sources on 17 Oct 2026.SVG Optimizer makes SVG files smaller in your browser, often by 30 to 70 per cent for files saved by Inkscape, Illustrator or Figma. It removes comments, metadata and editor data, rounds numbers to 3 decimals and rewrites path data in its shortest form, keeping text and styles untouched. Up to 200 files at once; nothing is uploaded.
Press Select SVG files, or drop one or many .svg files; they are read on your device.
Each file is optimised at once, with its size before and after and a side-by-side preview.
Change the number of decimals kept if a drawing needs more precision.
Press Download to save the smaller SVG, or all of them in one zip.
An SVG is text, and drawing programs write a lot of text that a browser never uses: comments, an XML declaration, a metadata block, their own namespaces for layers and zoom level, and coordinates with six decimals. This page removes that and keeps the drawing.
What changes.
| Before | After |
|---|---|
<!-- Created with Inkscape -->, <metadata>, inkscape:label="Layer 1" |
Removed |
M 10.000000,20.500000 L 30.123456,40.987654 |
M10 20.5L30.123 40.988 |
viewBox="0.000 0.000 210.0000 100.5000" |
viewBox="0 0 210 100.5" |
r="10.50px", stroke-width="1.0000" |
r="10.5", stroke-width="1" |
Empty <g></g> and <defs/> |
Removed |
| Line breaks and indentation between tags | Removed |
What never changes. The text inside <text>, <style>, <script>, <title> and <desc> is kept exactly, spaces included. Attributes such as id and class stay, so CSS and links that point at them still work. Numbers are rounded, not cut: three decimals is far finer than a pixel for icons and logos, and you can keep up to six for maps or technical drawings.
Illustrator files. Illustrator writes its namespaces as DOCTYPE entities such as &ns_svg;. They are written out in full before the DOCTYPE is removed, so the result stays valid.
Checks before saving. A file with a tag that is never closed, or an attribute without quotes, is reported with the problem rather than saved broken. Path data that cannot be read is left as written.
Preview. Each file shows the original and the optimised drawing side by side, and the size saved.
Tested with 300 generated drawings: every output is checked as valid XML by a separate parser, and every path point is compared with the original within the rounding chosen. Nothing is uploaded.
Drop the .svg on SVG Optimizer. Comments, metadata and editor data are removed, numbers are rounded to 3 decimals and path data is rewritten in its shortest form at once. The size before and after appears with a preview, and Download saves the smaller file.
Not visibly. Numbers are rounded to 3 decimals by default, a thousandth of a unit, far below a pixel for icons and logos. Text, styles, ids and classes are kept exactly. For maps or technical drawings at large zoom, choose 4 to 6 decimals.
Comments, the XML declaration, the DOCTYPE, the metadata block, data from Inkscape, Sodipodi, Sketch, Illustrator and Figma, unused namespace declarations, empty groups and definitions, and whitespace between tags. Titles and descriptions stay unless you choose to remove them, because screen readers use them.
Similar in purpose, with fewer and safer steps. SVGO can also merge paths and convert shapes, which sometimes changes rendering. This page sticks to changes that cannot alter the picture: removing unused data, rounding numbers and writing path data in its shortest legal form.
Yes. Drop up to 200 files together; each is optimised and listed with its saving. Download all saves them in one zip with the same names plus .min.svg, ready for a website or an icon set.
No. The files are read and optimised by your own browser, and the results are saved from your device. Logos and unreleased designs never reach a server, and nothing remains once you close the tab.
Rates and rules change; check the source before you rely on a figure.
Still stuck? Ask about SVG Optimizer and anybody who knows can answer. No account needed.
Same job, other tools: Compress Image to 100 KB – Get any photo under 100 KB for forms and portals · Compress Image to 1 MB – Trim a high resolution photo to just under 1 MB · Passport Photo Resizer – Resize a photo to 35×45 mm at 300 DPI for Indian passport and visa forms · Passport Size Photo – Convert a photo to Indian passport size: 35×45 mm at 300 DPI, exactly 413×531 pixels · SVG to AVIF – SVG drawings to AVIF: the smallest modern web format, nothing uploaded.
On the related tools: HEIC to PNG – Convert iPhone HEIC photos to lossless PNG.