SVG Optimizer
NEWMinify SVG code by removing metadata, comments and extra precision, and see the size savings.
Runs 100% in your browser — your input is never uploaded or stored on our servers.
Or paste the SVG code below. Nothing is uploaded.
Quick Examples
Typical inputs and the results this tool produces.
Overview
SVG files exported from Inkscape, Illustrator, Sketch or Figma carry a lot of baggage: editor metadata, comments, namespaces, empty groups and coordinates with six or more decimals that nobody can see. This SVG optimizer strips it away so the graphic loads faster, fits inline in your HTML or CSS and is easier to read.
Each optimisation is a checkbox, so you stay in control: remove comments, <metadata> and editor data, drop empty groups and default attribute values, minify inline styles, collapse whitespace and round path numbers to the precision you choose. Paths are rewritten with a real path-data parser, so compressed arc flags and implicit commands survive intact.
The tool never silently throws away the viewBox, warns about scripts and event handlers, and compares the before and after renders so you can see that the picture still looks the same. Everything runs in your browser — your SVG is not uploaded.
Why use this tool?
- Shows the exact bytes saved, so you see the real result
- Safe options: the viewBox is never dropped and renders are compared
- Live before/after preview with exact byte savings
- Warns about <script> and event handlers in untrusted SVG
- Private — no upload, works offline
Features
Strip editor data
Removes Inkscape, Sodipodi, Adobe and Sketch elements, attributes and unused namespaces.
Numeric precision
Round coordinates, points and transforms to 0–6 decimals, or keep every digit.
Path rewriting
Compact path data with minimal separators, no leading zeros and merged repeated commands.
Cleanup options
Empty groups, plain group wrappers, default values, unused IDs and inline CSS can each be switched on or off.
Before / after preview
See both versions side by side with a visual similarity score.
Size report
Original and optimised bytes, percentage saved and a list of what changed.
How to Use
Add your SVG
Upload an .svg file or paste the code into the box.
Choose optimisations
Keep the defaults, or tick and untick options and pick the numeric precision.
Check the result
Compare before and after, read the size savings and the list of changes.
Copy or download
Copy the optimised code or download it as a .min.svg file.