PK Systems PK Systems
Image Tools

SVG Optimizer

Shrink SVG files in your browser. Strip metadata, collapse groups, round numeric precision, and optionally remove width/height for responsive scaling.

SVG Optimizer

Drop an SVG file here or click to choose

Lower = smaller file but visible rounding on curves. 2 is safe for icons; 3 for illustrations.

Optimized SVG

What does an SVG optimizer do?

SVG files exported from design tools (Figma, Sketch, Illustrator, Inkscape) are usually 30-70% bigger than they need to be. Editors leave behind comments, signature metadata, redundant CSS, empty groups, and excessive numeric precision that no human eye can perceive. An optimizer rewrites the same drawing into a smaller, equivalent SVG — pixel-identical to a renderer, but a fraction of the file size. Everything happens locally on your device — your SVG is never uploaded, never copied to a server, never logged. That privacy guarantee matters for branding files, internal product icons, and any SVG that should not sit on a third-party server. The defaults are tuned for icon-grade work: precision is set to 2 decimals, comments and editor metadata go, useless groups collapse, and the original viewBox stays intact for responsive scaling. For illustrations with subtle curves bump precision up to 3; for responsive icon sets the remove dimensions option strips the fixed width/height attributes so CSS can scale the icons to whatever size you set in your stylesheet.

How to optimize an SVG

Paste the SVG markup or drop a .svg file onto the dropzone. Tweak the option checkboxes — defaults are sensible. Pick the numeric precision (2 is fine for most icons), then press Optimize. The before/after preview lets you confirm nothing visual changed. Copy the optimized markup or download the file directly.

Tips that save more bytes

Run a single colour palette and avoid embedded raster images — base64-encoded PNGs inside SVG defeat the format. Convert text to paths only when you need a specific glyph; otherwise keep <text> tags so screen readers and search engines see the content. Compress the resulting file with gzip/brotli on your server: optimized SVG compresses very well, often hitting 70% of the post-optimization size.

What each option does

Option Effect Notes
Remove commentsStrips blocks editors leave behind.Almost always safe. Disable only if comments document the file.
Remove metadataRemoves elements (Adobe, Sketch, Inkscape signatures).Safe — metadata is for the design tool, not the renderer.
Collapse useless groupsRemoves elements that have no styling and only one child.Visually identical, often saves 5–15%.
Remove width/height (responsive SVG)Strips the width/height attributes so CSS sizes the SVG.Useful for icon systems; off by default to keep the file standalone.
Numeric precisionRounds path numbers to N decimals.2 is the default, 3 for fine illustrations, 1 only for tiny icons.

Frequently asked questions

Will optimization break my SVG?
The default settings are conservative and visually safe for the vast majority of files. Animations using SMIL or external scripts can occasionally need a precision bump or a different option mix, but every option is opt-in and the before/after preview lets you confirm nothing visual changed before downloading.
Is anything uploaded?
No. The optimisation runs locally on your device. Files are not uploaded, not stored, not indexed, not logged, not shared. The page works even if you go offline after it loads.
What about SVG sprites or symbols?
They optimize fine, but build the sprite first then optimize. Optimizing each symbol separately can change ID names that the sprite reference depends on.
How small should icons be?
Most well-designed icons land between 200 B and 2 KB optimized. If yours is bigger, you probably have raster traces, embedded fonts or excessive viewBox padding.
Should I keep xmlns and viewBox?
Yes. The defaults keep both. Without xmlns the SVG will not render outside HTML5; without viewBox you lose responsive scaling. Both attributes are tiny and worth keeping.
Can I batch optimize many files?
This tool handles one file at a time, which keeps the before/after preview useful for spotting any unwanted change. For optimising a whole folder of icons in one go, a build-time tool integrated into your toolchain is the right move.