SVG Optimizer
Make static icons and illustrations smaller with exact number cleanup, compact paths and shorter colors. Keep your viewBox, dimensions, IDs and accessible descriptions.
SVG source stays in this page's memory. Up to 200 KiB per file. No SVG is rendered or executed here. This tool has no upload or remote URL service.
Optimize your SVG source
Maximum 204,800 bytes. SVGZ, remote images, fonts, animation and stylesheets are unsupported. You can also paste below.
Paste a complete <svg xmlns="http://www.w3.org/2000/svg"> document. Oversized text is retained and rejected, never cut off.
Source inspection only. No image preview or pixel-equivalence test. Verify your downloaded SVG in its intended use before replacing your original.
Ready. Paste SVG source or choose a local file.
Measured result
- Original UTF-8 bytes
- Output UTF-8 bytes
- Saved
Savings compare the exact submitted text and downloadable output. They are uncompressed byte sizes, not gzip sizes or a page-speed prediction. A normalized file can be larger.
How to use the optimizer
- Export a plain, static SVG from your editor. Paste its full source or choose one local file.
- Keep the default exact-value settings, or turn individual transformations off. Comment and metadata removal are optional because they discard information.
- Choose Optimize SVG. Inspect the measured bytes and change counts, then copy or download the output. Keep your original and check the result in your website.
What gets smaller?
The optimizer compacts XML, removes indentation between graphic elements, shortens equivalent decimal spellings, validates and compacts path commands, and rewrites colors only when the replacement is shorter. For example, 0.5000 becomes .5 and #aabbcc becomes #abc. It does not round geometry, merge paths, delete IDs, remove viewBox or strip accessible titles and descriptions.
Supported SVG and limits
Designed for standalone icons and static illustrations made from paths, circles, ellipses, rectangles, lines, polygons, polylines, groups, gradients, clipping, masks and patterns. Local references are supported; use can reference a single basic shape. Known presentation attributes and simple inline styles are supported. Text must be outlined first; title, description and plain-text metadata are supported as text.
Scripts, event handlers, animation, external URLs, images, fonts, rich editor metadata, unknown namespaces, stylesheet elements, CSS variables, CSS escapes and unsupported features are rejected. Export plain SVG with presentation attributes if your editor adds these features. This is a restricted optimizer, not a complete SVG validator or general-purpose sanitizer.
Limits: 200 KiB input and output, 4,000 XML nodes, 48 nesting levels, 48 attributes per element, 32,000 numeric tokens, 10,000 path segments, and a two-second processing deadline. Individual numbers are limited to 80 characters and nonzero magnitudes from 10-12 to 1012. Resource-reference chains are limited to 16 levels. Unsupported or over-limit content is reported without changing the original.
Privacy and integration
Processing uses local JavaScript and browser memory. This tool does not upload source, fetch SVG URLs, store files, or load input resources. The website's shared analytics remain governed by the site's privacy settings. Clearing the tool removes its current source and result; it cannot remove copies already downloaded or copied to your clipboard.
Optimization can change source formatting and attribute spellings. Review any code that depends on those exact strings. Keep license notices when required. IDs, classes, local references, element ordering, dimensions and accessible text are retained. No visual comparison is performed here.
Format references: SVG path grammar, XML 1.0 and CSS color notation.