Overview / Images & Graphics / SVG Optimizer
Images & Graphics 100% In-Browser & Offline

SVG Optimizer

Shrink SVG files by removing editor data, comments and surplus digits. Compare before and after, then copy or download the result. Runs in your browser.

Drop or choose a file; settings change the result instantly.

Your files and input never leave your browser – nothing is uploaded.

Digits kept in coordinates. 3 is safe for icons; 1 or 2 makes files smaller but can shift thin details.

Turn off id shortening when the SVG is used inline and its ids are targeted by your CSS or scripts. Keep the title if the image must be readable by screen readers.

Compare both previews before you replace a file: they should look the same. Your SVG is processed in this tab and is never uploaded.

Why SVG files carry so much extra data

Drawing programs save more than the drawing: editor namespaces, layer names, comments, hidden elements, paths written with ten decimals and ids like “Layer_1-copy-3”. A browser needs none of it. The optimizer behind this page parses the file, removes what has no visible effect and rewrites the rest in its shortest form, so icons and illustrations often shrink by a third or more without any change in how they look.

Optimize an SVG in four steps

  1. Paste the SVG code into the left box or press Open SVG file.
  2. Set the number of decimal places and tick the options you need.
  3. Compare the two previews and read the saved size below the result.
  4. Press Copy or download the new file as .min.svg.

What each option does

  • Decimal places rounds coordinates. Three digits are safe for icons; one or two suit large, simple shapes.
  • Several passes repeats the clean-up until nothing more can be saved.
  • Shorten ids renames the ids that are used and drops the rest. Turn it off for inline SVG whose ids are styled or scripted elsewhere.
  • Remove width and height lets the image scale with its container, provided a viewBox is present.
  • Remove scripts deletes script elements and event attributes, useful before you embed an SVG from an unknown source.

Checks before you replace the original

Optimization is safe for most files, but aggressive rounding can nudge hairlines, and removed ids can break CSS or animations that point at them. That is why the page shows the original and the result side by side. Keep the original file until you have seen the new one in its real place.

Nothing is uploaded

The optimizer is loaded once and runs inside this tab. Your artwork never reaches a server, which matters for unreleased logos and client work.

Frequently asked questions (FAQ)

With the default options the image should look the same. Lowering the decimal places or removing ids can change details, so check the preview before you replace a file.