Tab indents · Esc, then Tab moves focus Ln 1, Col 1

Up to 200,000 characters. Ctrl/Cmd + Enter optimizes. XML is processed as text in a worker.

Files are read locally, never uploaded. Maximum file size: 800,000 bytes; the text limit still applies.

Optimized SVG

742 → 559 UTF-8 bytes

SVG

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 200" role="img" aria-labelledby="signal-title signal-desc"><title id="signal-title">MRHTML signal study</title><desc id="signal-desc">Three blue circles connected by an orange path.</desc><rect x="0" y="0" width="320" height="200" rx="24" fill="#f4f6fb"/><path id="signal-path" d="m60 135 100-70 100 45" fill="none" stroke="#e66d35" stroke-width="8" stroke-linecap="round"/><g fill="#2459d3"><circle cx="60" cy="135" r="16"/><circle cx="160" cy="65" r="16"/><circle cx="260" cy="110" r="16"/></g></svg>

Optimization is not sanitization. The export can retain scripts, event handlers and external references. Review untrusted SVG before using it elsewhere.

The restricted preview is optional and may omit SVG features.

The sample output is ready. Enable JavaScript to optimize your own SVG.

Make SVG markup smaller while retaining useful structure

  1. Paste a complete SVG document or choose a local file.
  2. Choose a precision and compact or readable output, then select Optimize SVG.
  3. Compare the UTF-8 byte sizes and review the code. Use the optional restricted preview as a drawing check.
  4. Copy or download the exact optimized SVG. Test it in its intended page before publishing.

What does this optimizer preserve?

The explicit SVGO pipeline keeps every viewBox value, element ID, title, description, role and ARIA attribute. It does not collapse groups, remove hidden elements, merge paths, rename IDs, inline styles or remove dimensions. Numeric attributes and path coordinates are rounded to your precision; colors and path commands can be shortened. Comments and XML processing instructions are removed. License comments therefore need to be retained separately when required.

Precision and byte size

For example, a coordinate of 12.34567 becomes 12.346 at three decimal places. Rounding can change fine geometry, especially at small scales. Use higher precision when necessary. Readable output adds indentation and may be larger than the source. The comparison measures uncompressed UTF-8 bytes, not network transfer size.

Is optimized SVG safe to embed?

No safety guarantee is made for the export. Optimization is not sanitization. Script elements, event attributes, styles and remote references may remain in the exported text. The optional preview builds a separate allowlisted drawing copy, omits scripts, style, links, images, use references, filters, masks, gradients and animation, and runs inside a sandbox with a restrictive content policy. Its appearance may differ from the full SVG. Preview changes never alter the export.

Limits and local processing

Input is limited to 200,000 UTF-16 code units, 4,000 XML nodes and 64 nesting levels. Output is capped at 500,000 characters. DOCTYPE and entity declarations are rejected. Each run uses a new worker with a four-second deadline; Cancel or editing the input discards the pending result. No SVG content is sent by this tool, and SVG resource URLs are never fetched.

References

See the official SVGO browser guide, plugin configuration, and path optimization reference . This tool uses a smaller explicit plugin list than the default preset.