SVG Optimizer

Paste SVG markup or choose an .svg file and shrink it with SVGO, the same optimiser used by many build tools. Editor metadata, comments, empty groups, default attribute values and over-precise coordinates are removed, shapes are converted to compact paths where that is smaller, and you can compare the original and optimised images side by side before downloading.

CSS & Frontend Runs in your browser

Optimise Your SVG

Drag and drop an SVG file here, or click to browseOr paste the markup below.
Digits kept after the decimal point in coordinates.

How to Use the SVG Optimizer

  1. Choose an SVG file or paste the markup into the box.
  2. Set the decimal precision and the other options (the defaults are safe for most icons).
  3. Press Minify and compare the before and after previews.
  4. Copy the optimised code or download it as an .svg file.

About This Tool

Front-end developers preparing icons and illustrations for the web, designers exporting from Inkscape, Illustrator or Figma, and anyone inlining SVG into HTML or CSS.

Input: SVG markup or .svg file  ·  Output: Optimised SVG.

Features and Limitations

Features

  • Runs SVGO 4 in your browser; your file is never uploaded.
  • Shows the original size, the new size and the percentage saved.
  • Keeps <title> and <desc> by default, because they provide the accessible name of the image.
  • Scripts are always removed from the output.
  • Before and after previews are rendered as images, so no SVG code runs on this page.

Limitations

  • Low precision (0–1) can visibly distort small icons or detailed illustrations, so always compare the previews.
  • Animations or scripts that refer to element IDs can break unless you tick Keep IDs.
  • Embedded raster images (base64 PNG or JPEG) are kept as they are and are not recompressed.
  • Processing happens on your device, so very large files depend on your browser's available memory.

Example

The sample Inkscape export (about 1.2 KB) shrinks to roughly 300 bytes: the metadata, editor namespaces, empty defs, nested groups and the six-decimal coordinates are removed.

Frequently Asked Questions

Is optimised SVG lossless?

Mostly. Removing metadata and comments is lossless, but rounding coordinates is a tiny visual change. At precision 2 or 3 it is usually invisible; check the preview if you go lower.

Why should I keep the title element?

When an SVG is inlined in HTML, its title is announced by screen readers as the image's name. Only remove it for purely decorative images.

What does removing width and height do?

With only a viewBox, the SVG scales to its container like a responsive image. Keep the dimensions if the file must display at a fixed size, for example in an email.

Can I optimise many files at once?

Not here; the tool handles one SVG at a time. For whole folders, the SVGO command-line tool or a build plugin is more practical.

Related Tools

More like this: all CSS & Frontend tools, all Developer & Web tools or the TinySandy home page.