SVG Optimiser
Minify and clean SVG files online — remove metadata, comments, empty groups and unused definitions. See a detailed removal log showing exactly what was stripped, compare before/after in a side-by-side code view, and batch-process multiple files. Free, no upload, 100% private.
SVG Optimiser Tool
Rate this tool
Everything in this free online SVG optimiser
The only free SVG optimiser that shows you a detailed removal log — not just a file size reduction percentage, but exactly what was stripped: 4 comments, 2 empty groups, 1 metadata block. Unique on free tools.
How to optimise an SVG file online — step by step
-optimised appended.How this SVG optimiser compares to the alternatives
We tested every major free SVG minifier and cleaner. The core optimisation quality is similar across tools (most use SVGO under the hood) — the real differences are in the workflow, transparency and control.
| Feature | LazyTools ✦ | SVGOMG | svgoptimizer.com | Vecta.io Nano |
|---|---|---|---|---|
| Optimise SVG file online | ✔ Yes | ✔ Yes | ✔ Yes | ✔ Yes |
| Detailed removal log (what was removed) | ✔ Per-pass counts | ✘ No | ✘ No | ✘ No |
| Side-by-side before/after code view | ✔ Yes | ✔ Yes | ✘ No | ✘ No |
| Live SVG preview (before and after) | ✔ Both panels | ✔ Yes | ✘ No | ✘ No |
| Paste SVG code directly | ✔ Yes | ✔ Yes | ✘ No | ✘ No |
| Selectable per-pass plugin toggles | ✔ Yes | ✔ Yes | ✘ No | ✘ No |
| Batch multiple SVG files at once | ✔ Yes | ✘ No | ✘ No | ✘ No |
| No watermark on output | ✔ Never | ✔ Yes | ✔ Yes | ✘ Free tier adds watermark |
| 100% client-side — no upload to server | ✔ Always | ✔ Yes | ✘ Uploads | ✘ Cloud-based |
| No login or account required | ✔ Yes | ✔ Yes | ✔ Yes | ✘ Account required |
The Complete Guide to SVG Optimisation — What It Removes and Why It Matters
SVG files exported from design tools are almost always larger than they need to be. Illustrator, Figma, Inkscape and Sketch all embed additional data into exported SVG files that makes sense for the authoring environment but is completely unnecessary for browser rendering. Understanding what that data is — and what it's safe to remove — helps you optimise more confidently and debug edge cases when something changes unexpectedly.
What does an SVG optimiser actually remove?
The typical SVG exported from Illustrator or Figma contains several categories of unnecessary data:
XML processing instructions and doctype declarations. SVG embedded directly in HTML does not need an XML declaration (<?xml version="1.0"?>) or doctype. These add bytes with no rendering effect when used inline or as an <img> source.
Editor metadata blocks. Illustrator embeds an extensive <metadata> block containing Dublin Core RDF triples, creation timestamps, Illustrator version data and document settings. Inkscape embeds its own namespace (sodipodi:) with editor-specific attributes. Figma embeds a figma:... namespace. None of this affects rendering.
XML comments. Illustrator often includes layer comments and export notes as XML comments (<!-- Generator: Adobe Illustrator ... -->). These are safe to remove from production SVGs though worth keeping in source-controlled originals.
Empty group elements. Complex Illustrator documents frequently export nested g elements that serve only as layer containers during editing. When those layers have no visible content after flattening, the <g> tags remain in the export with no children. Collapsing or removing these has no visual effect.
Unused definitions. The SVG <defs> block contains reusable elements — gradients, filters, clip paths — that are referenced elsewhere in the file. During editing, elements may be added to <defs> and then removed from the visible artwork without the definition being cleaned up. Unused definitions add bytes with no visual contribution.
Default attribute values. SVG has many attributes that have default values when omitted. For example, fill="black", opacity="1", visibility="visible" — any attribute set to its default value can be safely removed. Design tools frequently include these explicitly for legibility, but browsers know the defaults without being told.
Excessive coordinate precision. Path coordinates exported from vector editors often have 6+ decimal places (M 123.456789 456.123456). At typical web display sizes, coordinates rounded to 2 decimal places are visually indistinguishable. Reducing precision to 2dp can significantly shrink path data, particularly in complex illustrations.
When SVG optimisation is and isn't lossless
Most standard optimisation passes are truly lossless — the rendered output is pixel-identical to the original. However, three specific optimisations deserve caution:
Path precision reduction is technically lossy but practically imperceptible at normal display sizes. At extreme zoom (4000%+), sub-pixel differences may be visible in complex paths with tight curves. For SVGs used at print resolution or in technical diagrams where precision matters, keep precision at 3–4dp rather than the default 2.
Comment removal is fully lossless visually, but may remove licensing information embedded as XML comments. If your SVG uses a Creative Commons or other open-source licence that requires attribution to be preserved, either keep comments enabled or ensure the attribution exists somewhere else in your project.
Metadata removal removes Dublin Core and XMP metadata blocks. This has no visual effect, but if your SVG is part of a document management system that reads SVG metadata for cataloguing, keep this pass disabled.
SVG optimisation in web performance
SVG optimisation contributes to web performance in two ways. First, directly: a smaller SVG file takes less time to transfer over the network, particularly noticeable on mobile connections. Second, indirectly: a smaller SVG DOM has fewer nodes for the browser to parse and lay out. Complex SVGs with thousands of path elements can contribute to parsing jank even after transfer — reducing the node count through group collapsing helps here.
SVG files can be additionally compressed with gzip or Brotli at the server level (since they are text-based XML), which typically achieves another 60–80% reduction on top of the optimised size. This is separate from and additional to the optimisation this tool performs. If your web server serves SVGs with Content-Encoding: gzip, the gzip benefit applies to the already-optimised file — so running optimisation before gzip compounds both savings.
SVG optimisation vs SVG conversion to PNG/WebP
SVG and raster formats (PNG, WebP) serve different purposes. SVG should be used for vector graphics — icons, logos, illustrations, charts — where scalability matters. Converting to PNG or WebP makes sense only when the SVG contains complex filter effects or gradients that are slow to render, or when you need a fixed-size image for a specific raster context.
For most icon and logo use cases, an optimised SVG will be smaller than an equivalent PNG at the same visual quality at 2× density, while remaining infinitely scalable. An optimised SVG icon at 200 bytes will look perfectly sharp on a 4K display; an equivalent PNG at 64×64 pixels would need to be 128×128 for Retina and still shows pixelation at larger sizes.