← All tools
SVG → clean SVG

SVG Minifier — Strip Comments, Metadata & Editor Cruft

Design tools leave behind comments, <metadata>, and namespaces like inkscape: that a browser never reads. Strip them all in one pass — production-ready SVG, no server involved.

svg-minifier — before → after
1 <!-- Created with Inkscape -->
2 <metadata id="meta123">...</metadata>
3 <sodipodi:namedview pagecolor="#fff">
4 <svg xmlns="http://www.w3.org/2000/svg"
5 viewBox="0 0 24 24">
6 // — stripped 3 lines, kept paths intact —
Before
Bloated SVG
Comments, editor namespaces, metadata & invisible cruft from design tools
~40% typical reduction
After
Production-Ready SVG
Clean, portable markup. Ready to commit, bundle, or deploy — nothing wasted.
svg-minifier

Drop an .svg file here

or click to browse · paste markup below

— or —

How it works

Three steps to a production-ready SVG

01 / Strip

Comments & Metadata

Removes XML comments, <metadata> blocks, RDF data and auto-generated tool annotations — data browsers never parse.

02 / Clean

Editor Namespaces

Strips inkscape:, sodipodi:, adobe: and ai: attributes that only exist for the design tool's convenience.

03 / Preserve

Accessibility-Aware

Keeps <title> and <desc> by default — screen readers need them. Toggle to strip when handled elsewhere.

What the SVG Minifier Removes

Every SVG exported from a professional design tool carries invisible baggage — data the editor needs but the web never reads. The SVG Minifier's job is to strip that baggage in one pass, leaving behind only the markup that matters: the shapes, colors and structure that actually render on screen.

Comments, Metadata & RDF

Design tools and developers routinely leave XML comments inside SVG files — generator stamps like <!-- Created with Inkscape -->, inline notes, and section markers. The <metadata> block is another common offender: it typically contains RDF data, Dublin Core creator info, licensing boilerplate, and document statistics that are never consumed by any browser or image viewer. The minifier strips all of it by default, often recovering 15–30% of file size before any other optimization runs.

Editor-Specific Namespaces & Attributes

Applications like Inkscape, Adobe Illustrator, Figma and Sketch attach their own namespaced attributes to SVG elements — inkscape:groupmode, sodipodi:namedview, ai:version, and corresponding xmlns: declarations. These exist for a single purpose: making the file re-open correctly in the original editor with layers, guides and settings intact. A web browser, a bundler, or an icon font never reads them.

Beyond taking up space, these attributes are a code hygiene issue: they embed toolchain-specific noise into what should be a clean, portable vector format. The minifier removes all editor namespaces and their declarations, producing an SVG that's ready to commit, deploy and share.

Why Clean SVGs Matter in Development Workflows

Minified SVGs aren't just smaller — they're safer for your development pipeline. When editor exports enter your codebase unprocessed, they carry baggage that creates real friction:

Minification in CI/CD Pipelines

The SVG Minifier is designed to slot into everyday development workflows. Because it runs entirely in the browser with no server dependency, you can use it as a lightweight pre-commit filter for your SVG assets:

Minify vs Compress — Choosing the Right Tool

SVGIFY offers two optimization tools that target different categories of bloat. Understanding the distinction helps you pick the right one — or combine them for maximum effect:

SVG Minifier
clean as you import

Strips non-visual cruft that design tools embed — comments, editor namespaces, metadata, and formatting whitespace.

  • Removes XML comments & RDF metadata
  • Strips Inkscape / Illustrator / Figma namespaces
  • Preserves title/desc for accessibility (toggleable)
  • Ideal as a pre-commit filter for design exports
SVG Compressor
precision & byte savings

Reduces numeric coordinate precision — the single biggest byte-saver for vector graphics.

  • Rounds path coordinates to fewer decimal places
  • Adjustable precision threshold (1–4 decimals)
  • Typically achieves 50–80% reduction in file size
  • Best for production assets & build pipelines

Use both in sequence for production assets. Minify first to eliminate editor noise, then compress to trim coordinate precision. This two-pass approach routinely achieves 60–80% total reduction and leaves you with an SVG that's both clean and lean.

Accessibility: Title & Description Preservation

SVG files can include <title> and <desc> elements — text descriptions that screen readers announce to visually impaired users. These are critical for making graphics accessible on the web, and the minifier preserves them by default.

Keeping <title> and <desc> is the right default — screen readers depend on them. That's why the "strip title/desc" option starts off. For maximum byte reduction after minification, follow up with the SVG Compressor.

Frequently Asked Questions

What kind of data does the minifier strip that a compressor keeps?
The minifier's primary focus is non-visual cruft: XML comments, metadata and RDF blocks, editor-specific namespaces (inkscape:, sodipodi:, adobe:, ai:), layer and guide data, and formatting whitespace between tags. The compressor tackles a different problem — numeric coordinate precision. Used together, they address two distinct categories of bloat with no overlap.
Will the minifier change my SVG's visual appearance?
No. The minifier exclusively removes data that browsers and renderers ignore. All visible elements — paths, shapes, fills, strokes, gradients, filters and text — pass through unchanged. The output renders identically to the original in every modern browser and image viewer.
When is it safe to strip <title> and <desc> tags?
Keep them for any SVG on a public-facing website — screen readers rely on them for accessibility and WCAG compliance. It's safe to strip them when: (1) your components provide equivalent ARIA labels on the containing element, (2) the SVG is purely decorative with aria-hidden="true", or (3) you're processing SVGs for an internal build where accessibility is handled at the application layer.
Which design tools produce the messiest SVG exports?
Inkscape tends to embed the most editor-specific data — sodipodi: and inkscape: namespaces appear on nearly every element. Adobe Illustrator adds ai: versioning attributes and multiple xmlns: declarations. Figma and Sketch exports are lighter but still include generated layer IDs and clip path markers. The minifier cleans up output from all of them in one pass.
Can I use the minifier as part of my development workflow?
Yes — it works well as a manual pre-commit filter. Paste a fresh export from your design tool, copy the cleaned output, and commit the result. For team workflows, establish a convention that every SVG entering /assets/ passes through the minifier first. The output format is ready to paste directly into .svg files, JSX components or template literals without any intermediate conversion.
Does the minifier send my SVG anywhere?
No — all minification runs locally in your browser via JavaScript. No file content is ever uploaded, stored or transmitted to any server. You can disconnect your internet after the page loads and the tool will continue to work normally.
Explore more tools

Related SVG Tools

Free

Image to SVG

Convert any raster image (PNG, JPG, WebP) into clean SVG paths — ready for editing or scaling.

Try it →
Free

SVG Compressor

Reduce file size by rounding coordinate precision — the biggest byte-saver for vector graphics.

Try it →
Free

SVG to PNG

Export crisp PNGs from any SVG at custom sizes — perfect for email clients and social sharing.

Try it →