SVG Optimizer
Paste SVG markup to remove common export noise, comments, metadata tags, editor attributes, and extra whitespace before copying or downloading.
SVG
Optimized SVG
Approximate savings: 92 bytes.
How it works
Enter your input
Fill in the values, paste your text, or upload the file this tool works with.
See results instantly
Most tools update live as you type; a few use a single button. Either way, the result appears right on this page.
Use your results
Copy, download, or share what the tool produces — you're always in control of the output.
What is SVG Optimizer?
Remove common export noise from SVG code while keeping the drawing elements, attributes, and paths intact.
How to optimize SVG markup
What gets removed
The optimizer removes XML declarations, doctype lines, comments, metadata blocks, extra whitespace, and common editor attributes such as Inkscape, Sketch, Sodipodi, and data-name fields.
What stays
Shape elements, path data, fills, strokes, dimensions, viewBox, and most regular SVG attributes are preserved. This makes the output smaller without trying to redraw or reinterpret the icon.
Before using optimized SVG
- Preview the SVG in your app or design system after optimization.
- Keep accessibility attributes such as title, role, or aria labels if your source uses them.
- Review SVG from untrusted sources before embedding it in a page.
Markup handling
The output is plain SVG text. Keep a copy of the original export if you may need editor metadata or layer names later.
Frequently Asked Questions
Does this change the drawing?
It should not intentionally change the drawing. It removes metadata and whitespace around the markup, but you should still preview important assets after optimization.
Does it minify path data?
No. It does not rewrite path commands or coordinates, so savings are conservative and less risky.
Why does it reject my input?
The input must contain an SVG element. If you pasted only a path or copied a rendered image, wrap it in valid SVG markup first.
Does it sanitize unsafe SVG?
No. It removes common export clutter, but it is not a security sanitizer. Review untrusted SVG before embedding it.
Related Tools
- AvailableLocal
Contrast Checker
Check foreground and background contrast for UI work.
- AvailableLocal
Aspect Ratio Calculator
Calculate proportional width or height for media and UI.
- AvailableLocal
CSS Generator
Generate clamp(), gradients, shadows, border radius, and grid CSS.
- AvailableLocal
SVG to Data URI Converter
Convert SVG markup to a CSS/HTML data URI and back.
- AvailableLocal
Color Palette Extractor
Extract dominant HEX and RGB colors from an image.
- AvailableLocal
CSS Specificity Calculator
Calculate and compare CSS selector specificity.
- AvailableLocal
Typographic Scale Calculator
Generate a font size scale from a base size and ratio.
- AvailableLocal
Color Blindness Simulator
Preview an image under common color vision deficiency modes.
- AvailableLocal
Screen PPI & Pixel Density Calculator
Calculate screen PPI, dot pitch, physical dimensions, and visual sharpness.
- AvailableLocal
Email Signature Generator
Create a polished signature with live preview.