What this tool changes
The tool reads and validates SVG XML, then applies the cleanup options you select. Processing and both previews happen in the browser. The result remains SVG markup; it is not converted to PNG or a canvas snapshot.
Available cleanup areas include comments and insignificant whitespace, metadata and editor data, redundant or empty attributes, IDs, and selected numeric values.
Choose the optimization controls
- Remove comments & insignificant whitespace removes XML comments and removable whitespace nodes. Whitespace in text-related elements is preserved.
- Remove metadata & editor data (Inkscape/Illustrator/Sodipodi/RDF) removes
<metadata>and matching editor-prefixed elements or attributes. It does not remove<title>elements. - Clean up redundant/empty attributes removes empty attributes and an unused
xmlns:xlinkdeclaration when noxlink:attribute is used. - Clean up IDs (unused removed, used ones shortened - references preserved) checks selected attribute references and
url(#id)references. It can remove unreferenced IDs and shorten referenced IDs. CSS selector references such as#idin a style block are not established as supported references. - Reduce numeric precision rounds selected attributes, path data, polygon and polyline points, transforms, and
viewBoxvalues. The Decimal places slider ranges from0to4and is used only when this option is enabled.
Review warnings and limitations
The tool accepts only SVG-looking files: the filename must end in .svg or the file type must be image/svg+xml. Malformed SVG XML, or a document whose root is not <svg>, is rejected with an alert.
After a valid file is loaded, the warning panel can report constructs that are outside the main cleanup scope or need extra review:
<script>elements and inline event-handler attributes such asonclickoronload, which are left untouched.- External
hreforxlink:hrefreferences, which are left untouched. - SVG filters and SMIL animation elements such as
<animate>,<animateTransform>,<animateMotion>,<animateColor>, and<set>, which are left untouched. <foreignObject>, raster<image>references, and inline<style>content. Supportedurl(#id)references can still be updated when ID cleanup is enabled.
Bitmap image data is not edited, but enabled attribute, ID, or precision cleanup can still affect surrounding SVG markup. The implementation does not state a maximum file size or guarantee support for particular browser versions.
How to optimize an SVG
- Drop an SVG file onto the drop zone, or click browse files.
- Review any entries in the warning panel.
- Select or clear the optimization controls. If Reduce numeric precision is enabled, set Decimal places with the
0-to-4slider. - Compare Before and After, then review the change report.
- Click Download optimized SVG.
Check the preview and change report
The Before and After panels render the SVG markup natively for visual comparison. Inspect both panels, especially when warnings appear; the tool does not guarantee unchanged appearance after every cleanup.
The change report lists only nonzero detected changes, including removed comments or whitespace, metadata/editor elements, editor attributes, empty attributes, the unused namespace case, removed or renamed IDs, and rounded numbers. It also shows the original size, optimized size, and savings. If there are no report items, it can state that no optimizations were selected or that nothing needed cleaning.
Frequently asked questions
Will this rasterize my SVG into a PNG?
No. The output and previews remain SVG-based. The tool does not create a PNG or canvas snapshot.
Can this change my SVG's appearance?
It can change selected SVG markup, including numeric values, so compare Before and After before downloading. Warnings identify constructs the optimizer leaves untouched, but they do not guarantee that every file will look unchanged.
Does it edit bitmap images inside the SVG?
It does not edit bitmap image data. Other enabled cleanup controls can still change surrounding SVG markup.
Is my file uploaded anywhere?
The file is read, parsed, optimized, and previewed in the browser. This page's implementation does not upload it.