SVG Optimizer
Clean up SVG markup with a conservative browser-side optimizer.
This is a conservative browser-side cleanup, not a full SVGO replacement. Untrusted SVG script and event-handler content is rejected rather than executed.
How to optimize an SVG
- Paste valid SVG markup.
- Run the conservative optimizer.
- Copy or download the cleaned SVG.
What this optimizer changes
The tool removes XML comments, common metadata elements, and redundant inter-element whitespace, then serializes the parsed SVG again. It deliberately avoids aggressive path rewriting or geometry changes, so it is not positioned as a full replacement for mature SVG optimization pipelines.
Metadata, accessibility, and viewBox
The current cleanup removes metadata, title, and desc elements, so accessibility-oriented title and description content should be preserved elsewhere if it is required. The optimizer does not rewrite path geometry or intentionally change the viewBox; it is a cleanup pass rather than a geometry optimizer.
What it intentionally preserves
The implementation does not perform path simplification, coordinate rounding, geometry rewriting, or other aggressive optimization. It also does not execute pasted SVG. This conservative behavior makes the output easier to reason about than a tool that applies broad visual transformations.
SVG safety
SVG can contain active content. Odelvo does not execute pasted SVG and rejects script elements, inline event-handler attributes, and javascript: URLs before output is produced.
Frequently asked questions
- Will this change the visual appearance of my SVG?
- The optimizer is intentionally conservative. It removes comments, common metadata elements, and formatting whitespace rather than rewriting paths or changing geometry.
- Is this a full SVGO replacement?
- No. It is a lightweight cleanup tool for common SVG markup, not a complete industrial SVG optimization pipeline.
- Can I paste untrusted SVG?
- The input is treated as untrusted text. Script elements, event-handler attributes, and javascript: URLs are rejected and the markup is parsed rather than executed.