SVG Optimiser
Drop an SVG or paste markup — get a leaner file with no editor cruft, smaller path data, and no upload.
Or paste SVG markup
Lower = smaller file. 3 is invisible at any normal viewing size.
Modern vector editors (Inkscape, Illustrator, Sketch) bake a lot of metadata into their SVG exports: RDF / Dublin Core blocks, custom namespaces, comment blocks, and float coordinates with 14 decimal places. None of that matters for the rendered image and it inflates the file by 30–70% for typical exports.
This tool runs a conservative optimisation pass in your browser. It strips comments and editor metadata, rounds numeric attributes to a configurable precision, removes empty <defs>, and collapses whitespace between elements. Geometry is never modified beyond decimal rounding — visual fidelity is preserved.
Related tools
Frequently asked questions
- Will the optimiser change how my SVG looks?
- No. The optimisations here are visually lossless — we only strip metadata, drop empty containers, round decimals (precision is configurable), and tighten whitespace. Path geometry isn't simplified, so any glyph or icon will render identically before and after.
- How much will it shrink the file?
- Typical Inkscape exports shrink by 40–70%. Illustrator exports vary more — sometimes 30%, sometimes 60% depending on which Adobe blocks are included. Hand-coded SVGs may already be lean and see only a few percent reduction.
- Is my SVG uploaded?
- No. The optimiser uses the browser's DOMParser to parse the SVG, applies transformations to the resulting DOM tree, and serialises it back to text — all locally.
- What's the difference between this and SVGO?
- SVGO does more — path-data simplification, attribute reordering, transform merging — at the cost of a much larger dependency. This tool delivers the 80% of value (editor-cruft removal + numeric rounding) with no external library. For ultra-fine optimisation, run the output through SVGO afterwards.
- Why doesn't decimal precision lower than 3 visibly change my SVG?
- Sub-pixel precision is invisible at any normal viewing size on any current display. Precision 3 keeps the file safely accurate at extreme zoom; precision 1–2 still looks identical at the sizes most icons and logos render at.