Optimize SVG

Image tools

Optimize an SVG with SVGO, then copy it as a data URI or CSS background. The SVG stays in your browser and is never uploaded.

Optimize an SVG in your browser and copy it as an optimized file, a data URI, or a CSS background — powered by SVGO, with nothing uploaded. Drop or paste an icon, tune the settings, and grab the smallest inline form for CSS, HTML, or your design system.

How it works

The tool loads SVGO — the standard SVG optimizer, the same engine behind SVGOMG — once from a public CDN, then runs entirely on your device. It strips editor metadata, comments, and redundant data, and rounds coordinates to a precision you choose. The optimized markup is then offered in four ready-to-use shapes, side by side with a live preview and the before/after size.

Steps

  1. Drop an .svg file onto the uploader, or paste your SVG code into the source box.
  2. Adjust the optimization toggles — lower Precision for smaller files, or leave the safe defaults.
  3. Watch the preview and the size reduction update live.
  4. Copy the shape you need (SVG, data URI, or CSS) or download the optimized .svg.

Output shapes — which to copy

OutputBest forNotes
Optimized SVGCommitting to a repo, icon systems, <img src>Cleanest source; download or copy
Data URI (URL-encoded)CSS background-image, inline HTMLSmallest data URI for SVG (~20–30% under Base64)
Data URI (Base64)Maximum compatibility, older toolingLarger, but never needs escaping
CSS snippetPasting straight into a stylesheetWraps the URL-encoded data URI in background-image

When to use URL-encoded vs Base64

SVG is text, and Base64 inflates text by about a third. For SVG specifically the URL-encoded data URI is smaller and just as valid in CSS and HTML, so it is the default choice for a CSS background. Reach for Base64 only when a build tool or platform mangles the reserved characters in a URL-encoded URI.

Optimization settings

SettingDefaultWhat it does
Precision3Coordinate/number precision (0–8). The biggest size lever; too low distorts curves
MultipassOnRe-runs passes until the output stops shrinking
Remove comments / metadataOnDrops <!-- --> and <metadata> / editor cruft
Clean up IDsOnMinifies and drops unused ids
Remove viewBoxOffRemoving it breaks responsive scaling — the classic SVGO footgun
Remove width/heightOffLets CSS size the icon via viewBox
Remove <title> / <desc>OffKept by default for accessibility
Sort attributesOffDeterministic attribute order for better gzip and diffs

Example

A 2.1 KB icon exported from a design tool — full of editor metadata, comments, and 6-decimal coordinates — typically drops to well under 1 KB with the defaults, then to an inline data:image/svg+xml,... string you can paste directly into a CSS rule with no extra request.

Private by design

Your SVG never leaves your browser. Only SVGO's code is fetched from the CDN (once, then cached); the markup you paste or drop is optimized locally, so it is safe for internal icons and unreleased brand assets.

Get in touch

Thanks for reaching out

Thank you for your interest in our company. A member of our team will get back to you within one business day.

What we can help with

  • Adopting and getting the most out of Turnint AI
  • A demo or trial of Turnint AI
  • AI adoption in general (beyond our own product, too)
  • Alliances and partnerships
  • Any other questions

Talk to us online

You can also book a meeting directly from the calendar.

Pick a template or write your own message.