SVG Cleaner (Remove Metadata and Comments)
This SVG cleaner removes common bloat like metadata, comments, editor namespaces, XML declarations, and other extra tags so your SVG is smaller, safer to preview, and easier to reuse in web apps, icon systems, and design pipelines. Paste SVG markup or upload a file, verify the preview, and export a cleaned SVG. Processing runs entirely in your browser.
Remove metadata, comments, editor junk, and other bloat from SVG files. Runs fully client-side.
When to use this instead of the minifier: choose the cleaner when you want safer markup, fewer editor leftovers, and script-related cleanup before worrying about the smallest possible file size.
Quick workflow
Use this checklist to get a clean export fast, without breaking references like gradients or clip paths.
- 1) Start with SafeSafe removes obvious bloat and strips risky script behavior while keeping ids/defs intact.
- 2) Compare previewIf the preview changes after cleaning, step back to Normal or disable aggressive options like id removal.
- 3) Clean for your targetFor icons and web apps, light minification helps. For design handoff, keep readability and ids.
- 4) Export and reuseCopy for inline SVG or download to commit to your repo and ship as assets.
Clean SVGs before Glowforge laser review
Use this wrapper when an SVG needs clutter removed before Glowforge laser cutting, engraving, import testing, or path review.
Before laser review
Remove comments, metadata, editor namespaces, XML wrappers, and unsafe script behavior so the file is easier to inspect before material tests.
Path and geometry checks
Preserve geometry, viewBox, fills, strokes, groups, and required references, then inspect path complexity, scale, and intended cut or engrave areas.
What cleanup cannot promise
Cleaned output is not laser-ready by itself. Review the SVG in your laser workflow and confirm dimensions, paths, material settings, and operation choices.
Start with Safe cleanup for SVGs you did not create. Aggressive id or defs removal can break references, so use it only after the preview still matches the source artwork.
What gets removed
The cleaner targets common export bloat and optional risky behaviors. It does not “redesign” your SVG.
- ✓Comments and metadata: XML comments,
<metadata>, RDF blocks, and editor notes. - ✓Editor namespaces: common prefixes from Illustrator/Inkscape that inflate the file and add noise.
- ✓XML/DOCTYPE wrappers: optional removal for cleaner embeds and fewer strict-parser warnings.
- iSafety stripping (optional): removes
<script>,on*handlers, and javascript: URLs. - ✓Whitespace cleanup: trims extra whitespace and optionally lightly minifies markup for smaller output.
What we keep untouched
Rendering relies on references. The safest cleaner avoids touching the parts that frequently break.
- ✓Geometry and shape content (paths, rects, circles, groups)
- ✓Styling that affects rendering: fills, strokes, gradients, patterns, filters
- ✓Reference systems: defs, symbols, clip-paths, masks, and
url(#id)links (unless you choose Aggressive options) - iIf you enable aggressive id/defs removal, verify preview before exporting. That is the #1 cause of “broken” SVGs.
Mode behavior (what each one is for)
Removes comments, obvious metadata, common editor prefixes, and optional XML/DOCTYPE wrappers. Safety stripping removes script behavior. Keeps ids, defs, and structure intact.
Similar to Safe, with more consistent whitespace cleanup for web reuse. Usually the best default for icons and inline SVG in apps.
Maximum reduction. Can remove ids, unused defs, and extra attributes. Use only after confirming the cleaned preview matches the input.
Cleaner vs minifier
Use the SVG cleaner when the file has comments, metadata, editor namespaces, unsafe script behavior, or confusing structural clutter. Use the minifier when the SVG already renders correctly and your main goal is reducing file size for a website, icon set, or app bundle.
The cleaner can still reduce bytes, but its first job is safer, easier-to-review markup. After the cleaned preview looks right, the minifier is a better next step for compact spacing and shipping-size tweaks.
Troubleshooting checklist
You removed ids or defs. Keep ids/defs enabled and avoid aggressive removal on files that use url(#...) references.
Same root cause: broken references. Switch to Safe/Normal and re-run, or disable any option that removes ids.
Ensure the SVG has a valid viewBox. Missing viewBox leads to odd scaling behavior in HTML and React wrappers.
Keep safety stripping on. SVGs can contain script blocks and event handlers. Stripping them reduces risk during preview and embedding.
Glowforge SVG cleanup workflow
SVG cleaner for Glowforge laser cutting, engraving, and path review
Use this page when an SVG needs clutter removed before Glowforge laser cutting, engraving, import testing, or path review. Cleaned output is not laser-ready by itself, so inspect it before material tests.
Best for
- Glowforge SVG cleanup before laser cutting or engraving review.
- Simple logos, outlines, engraving marks, and cutting artwork with extra editor markup.
- Users who want a cleaner file before checking scale, paths, and operation choices.
Settings to try
- Start with Safe cleanup for SVGs from unknown sources.
- Preserve geometry, viewBox, groups, fills, strokes, ids, and defs until preview confirms they are safe to change.
- Use resize or file-size tools after cleanup if dimensions or complexity still need review.
Useful limits
- Cleaning does not validate machine settings, materials, or Glowforge upload behavior.
- Path complexity, duplicate shapes, hidden objects, fills, and strokes still need review.
- Run small material tests before any production cut or engraving job.
Related tools
Need help choosing?
Read the concise workflow, preset, settings, and troubleshooting docs without adding clutter to the converter.
❓FAQ
Does cleaning make an SVG ready for Glowforge?+
No. Cleaned output is not laser-ready by itself. It can make markup easier to inspect, but final cutting or engraving depends on the SVG geometry, dimensions, material, software setup, and machine settings.
What should I inspect before laser use?+
Check path complexity, final size, duplicate shapes, hidden objects, unwanted fills or strokes, and whether intended cutting and engraving areas import as expected.
Is this Glowforge SVG cleaner private?+
Yes. Cleaning runs in your browser, so SVG markup is not uploaded to a server.
Can I remove ids and defs for laser files?+
Only after previewing. Some SVGs rely on ids and defs for masks, clip paths, gradients, or symbols, and removing them can change the visible result.
