SVG Optimizer

Paste or drop an SVG. Strip the cruft. See exactly how many bytes you saved.

Input SVG
Preview will appear here
Bytes0
Optimized SVG
Awaiting input…
Bytes0

What is this SVG optimizer?

This free SVG optimizer strips the editor cruft, metadata, comments, default attribute values and excess whitespace that Illustrator, Inkscape and Sketch leave behind, then rounds numeric values to a configurable precision — so you ship leaner vector files without losing render fidelity.

How do I shrink an SVG file online?

Paste the SVG or drop a file into the input pane. Toggle the optimizations you want, slide the precision down, and the cleaned output appears in real time with a byte-by-byte savings counter. Copy or download when you are happy.

Key features

Ten granular toggles
Each rule is independent — keep titles for accessibility, drop default attributes for size, strip editor namespaces for portability. Hover a toggle for the exact pattern it removes.
Configurable numeric precision
Slide between zero and six decimal digits to balance file size against curve fidelity; the live preview shows the trade-off instantly.
Before/after side-by-side
Input and output panes both render the SVG and report byte counts plus percent saved so you can see exactly what the optimizer changed.
Private by design
Everything runs in your browser; confidential logos, unreleased icons or branded artwork stay on your machine.

How to use it

Paste an SVG string, drop a .svg file with the Upload button, or click Load sample SVG to try a quick example. Tune the toggles and precision slider until the output preview still looks right and the byte savings feel worthwhile. Copy the result or download it as a clean .svg.

Frequently asked questions

What does the SVG optimizer remove?

Comments, XML declarations, doctype, editor metadata from Inkscape, Illustrator and Sketch, empty groups and defs, default attribute values like fill='none' and stroke='none', collapsible whitespace, and rounds numerics — every rule is a toggle.

Is the optimization lossless?

By default yes — the rules only remove redundant or invisible data, so the rendered shape is byte-for-byte identical to the original. Dropping decimal precision below three digits can subtly snap curves; the preview shows the result.

Does my SVG ever leave my browser?

No. Optimization runs entirely on the page in JavaScript, so confidential logos or unreleased icon sets are safe to clean here without any upload.

Built by the Toolbox team against the W3C SVG 1.1 and SVG 2 specifications, using the same default-attribute table SVGO ships with, so each rule is grounded in the spec rather than guesswork. Run locally, no external service required.