SVG Optimizer
Clean up vector paths, strip editor metadata and minify SVG files safely.
How to use the SVG Optimizer
- Drop SVG files or tap Select SVG Files.
- Choose what to remove and set the numeric precision.
- Tap Optimize All and compare the before and after sizes.
- Copy the optimised code, or download single files or a ZIP.
About this tool
Shrink SVG files by stripping the extra code design tools leave behind. OmneKit removes editor metadata from Inkscape, Sketch and Affinity, plus comments, empty groups, unused definitions and default attributes, and rounds path coordinates to the precision you choose. Optimise a whole batch, then copy the code or download the files.
Smaller SVGs load faster on websites and are easier to read in code. The changes are structural, so icons and logos should look the same — open the optimised file to check it before you publish. Files are processed in your browser and never uploaded.
Why OmneKit
- Private: your artwork never leaves your device.
- Batch optimisation, free and without sign-up.
- Precision control to balance file size against accuracy.
Frequently asked questions
What does the SVG Optimizer remove?
By default, OmneKit removes: XML declarations (<?xml...?>), DOCTYPE declarations, HTML comments, metadata/title/desc elements, editor-specific namespaces and attributes (Inkscape, Sketch, Serif/Affinity), empty <g> groups, unused gradients/filters inside <defs>, unreferenced element IDs, static hidden elements, and redundant default attribute values like opacity="1" or visibility="visible". Each of these can be toggled individually in the settings panel.
Will optimization change how my SVG looks?
Usually not. The optimizations are structural: it removes unrendered nodes and unreferenced styles/gradients, and rounds coordinate decimals to your chosen precision. Very low precision, or files that rely on CSS <style> rules or <use> references, can shift slightly — open the optimized file and check it before publishing.
What does path optimization and numeric precision do?
SVG path data uses coordinates to describe shape nodes. Editors often export numbers with 6+ decimal places (e.g. "M 12.345678, 90.123456"), which is highly redundant. Path optimization: rounds numbers to the specified precision; removes leading and trailing zeros (e.g. "0.5" becomes ".5", "10.0" becomes "10"); and strips unnecessary separator spaces and commas (e.g. "M10 -20" instead of "M 10 , -20"). This often cuts the path data size by 30-50% on complex shapes.
How does style-to-attribute conversion work?
SVG elements can be styled with inline styles (e.g., style="fill:red; stroke:blue;"). Converting these styles to native presentation attributes (fill="red" stroke="blue") makes the SVG markup much cleaner, allows easier CSS overrides, avoids styling isolation conflicts when inlined in HTML, and saves extra bytes by removing style property delimiters.
What is Multipass cleaning?
Some SVG optimizations depend on others. For example, if a <pattern> elements is unused, it can be removed. Removing it might make a <linearGradient> that was only used by that pattern also unused. Multipass cleaning runs the optimization engine recursively (up to 3 times) to resolve these nested dependencies, continuing until no further byte savings can be gained.
Why are editor-exported SVGs so bloated?
Graphic editors like Inkscape and Illustrator write application-specific metadata (such as grid configurations, workspace settings, layers, and custom namespaces) into the SVG markup. This is useful for re-editing the file in that specific app but completely useless for rendering it on a website. Pruning this data reduces file size dramatically without visual loss.
Is it safe to remove the XML declaration and DOCTYPE?
Yes, absolutely. The XML declaration (<?xml...?>) and DOCTYPE are legacy elements not needed in modern web pages or app development. Web browsers and SVG renderers automatically detect and render SVGs correctly without them, whether they are inlined or referenced as <img> elements.
Does my SVG get uploaded anywhere?
No. The entire optimization pipeline is executed locally in your browser using standard DOM APIs and client-side scripts. No files, code, or images are ever uploaded to a server, guaranteeing complete privacy and security for your assets.
- Files stay on your device
- Free, no sign-up
- No upload wait
- Works on phone & desktop