Drop your SVG files here
or browse files, or paste SVG code with Ctrl+V
Optimization Preset
Balanced cleanup — removes metadata, comments, and obvious cruft without touching path data.
Shrink SVG files by 20–70% by removing metadata, comments, and editor cruft — 100% private, runs in your browser
or browse files, or paste SVG code with Ctrl+V
Balanced cleanup — removes metadata, comments, and obvious cruft without touching path data.
SVG is a text format, and most editors — Illustrator, Figma, Inkscape, Sketch — write a lot of extra into every export: XML metadata, comments, editor-specific attributes, hidden groups, redundant IDs, and path coordinates with absurd precision. Our free SVG optimizer strips all of that safely, cutting file size by 20–70% while keeping the rendering pixel-identical. It runs entirely in your browser — no uploads, no accounts, no watermarks.
SVG is the best format for icons, logos, and UI illustrations on the web — resolution-independent, tiny when lean, and styleable with CSS. But "lean" is the key word. Unoptimized SVGs often carry 2–5× more markup than the shape actually needs, and every byte is downloaded on every page load.
Smaller SVGs mean fewer bytes over the network and a quicker Largest Contentful Paint for logo and icon-heavy pages.
Optimized SVGs are readable enough to inline in HTML or paste directly into JSX and Vue components.
Editors embed author names, software versions, and timestamps. Optimization removes that metadata automatically.
An icon set with 200 SVGs can shrink from megabytes to kilobytes — better for git history and build times.
Lean SVGs are small enough to inline, so you can style them with CSS without an extra HTTP request.
No matter which design tool exported your SVG, the optimizer normalizes it to clean, standard markup.
The optimizer works on the SVG's XML tree. Every change it makes is visually safe — nothing that affects how the image looks is touched unless you choose Aggressive mode.
Editor notes like <!-- Generator: Adobe Illustrator --> are removed.
The <metadata> block with RDF, Dublin Core, and editor info is stripped.
IDs that no url(#...) or href references are removed.
Nested <g> elements with no attributes are collapsed into their children.
Namespaced cruft like data-name, xml:space, and enable-background is dropped.
Path coordinates like 123.456789 are rounded to 123.46 — imperceptible at any size.
Indentation, line breaks, and leading/trailing spaces between tags are collapsed.
Redundant defaults like fill="#000000" (which is already the default) are removed.
Different projects need different trade-offs. Choose the preset that matches how much certainty you want over file size.
| Operation | Safe | Default | Aggressive |
|---|---|---|---|
| Remove XML comments | Yes | Yes | Yes |
| Remove metadata block | Yes | Yes | Yes |
| Collapse whitespace | Yes | Yes | Yes |
| Remove unused IDs | No | Yes | Yes |
| Collapse empty groups | No | Yes | Yes |
| Drop editor attributes | No | Yes | Yes |
| Trim path precision | No | Yes | Yes |
| Remove default styles | No | Partial | Yes |
Keep accessibility (title, desc) | Yes | Yes | Optional |
You are already here — no installation, no account required.
Drag and drop, click browse, or paste raw SVG code with Ctrl+V.
Safe for maximum certainty; Default for the usual 40–60% savings; Aggressive for edge cases.
Expand any file to see the original and optimized code side by side, plus exact byte savings.
Copy optimized SVG code to clipboard, save files individually, or grab a ZIP of the batch.
Optimize as many SVG files as you like in one session, then download the whole set as a ZIP.
See exactly what changed — the original and optimized markup, side by side.
Copy a single optimized SVG or all of them at once, ready to paste into HTML or a component.
Safe, Default, and Aggressive modes cover everything from cautious to maximum compression.
Round path coordinates to 2 decimals for another 5–15% reduction, with no visible change.
Default preset preserves <title>, <desc>, and ARIA attributes.
Skip the file picker — paste raw SVG markup directly and optimize it as a file.
No uploads, no server, no logs. Your SVGs never leave your browser.
Output is clean SVG markup — no comments, no branding, nothing added.
SVG has won the vector format war. It is supported in every browser, styleable with CSS, animatable, accessible, and infinitely scalable. Every modern design system uses it for icons, illustrations, and brand marks. Yet SVG has one quiet cost: because it is XML, the same shape can be written in a dozen ways, and design tools are not written with compactness as a goal.
A typical Illustrator-exported logo might carry:
<metadata> block with RDF, Dublin Core, and editor info.data-name="Layer 1".None of that affects how the SVG renders. All of it is paid for on every page load. The optimizer removes it in milliseconds.
Savings depend entirely on the source. Rough ranges:
Not with Safe or Default presets. The optimizer only removes data that has no visual effect. Precision trimming (rounding coordinates to 2 decimal places) is imperceptible at any screen size and is the only change that could theoretically affect very large printed vector art — but even at 2 decimals, the maximum coordinate error is 0.005 units, well below any printer's resolution. Aggressive mode can remove accessibility metadata; use it only when you don't need screen-reader labels.
There are two ways to use an SVG on a page, and optimization helps both:
For a design system with 200 icons, optimized inline SVGs can save tens of kilobytes per page — an easy performance win with zero visual downside.
SVG files exported from editors can include metadata about:
If you publish such a file on the web, that metadata travels with it. Optimization removes it automatically — so publishing an optimized SVG is also the easiest privacy step you can take.
Raster formats — PNG, WebP, AVIF — store a grid of pixels. At a given size they look fine, but scaling up reveals blur. SVG stores shapes as maths, so it looks crisp at any size and often compresses smaller than any raster format for simple graphics. Use SVG for:
Use raster (AVIF/WebP) for photographs and complex imagery where SVG would be inefficient. For icons, SVG optimized properly is almost always the smallest and most flexible choice.
This tool is built on the same concepts as SVGO, the open-source Node.js SVG optimizer used by build tools like webpack, Vite, and Next.js image pipelines. Our browser-based optimizer applies equivalent passes — cleanup IDs, collapse groups, remove metadata, convert colors to shorter forms, merge paths where safe — without requiring Node.js or any install. The result is the same kind of output you would get from npx svgo, delivered by a UI you can use from any browser.
Drop your SVG files in the tool above, pick a preset, and save 20–70% in seconds. No signup, no watermark, no upload.
Start Optimizing