Skip to content

SVG Optimizer

Shrink SVGs by 40–70 % without changing how they look. See exactly what was removed. Batch, private, free.

SVG files or a whole folder · results appear instantly · or paste SVG code with Ctrl/⌘+V

Advanced settings (optional)
Optimisation options
Level

SVGO defaults with viewBox kept.

Precision

Decimal places kept for coordinates. 3 is invisible at any size; 2 is fine for icons.

Keep
Output

Runs in your browser. Files are never uploaded — you can go offline after the page loads.

How to use the SVG Optimizer

  1. Click “Choose Files” or drop your SVG files into the box above. Whole folders work too.
  2. Adjust the Advanced settings if you need to, then click “Optimise”.
  3. When the row shows Done, click “Download” — or “Download all” for a ZIP.

Easy to use

Drop files, pick options, download. Whole folders at once, no signup, no daily limit.

Best quality

The same engines the professionals use — SVGO, resvg, MozJPEG, libwebp, libavif — compiled to run in your browser.

Private & secure

Files are processed on your device and never uploaded. Close the tab and nothing remains anywhere.

What the SVG Optimizer does

Design tools export SVGs for editing, not for the web. A typical Illustrator, Figma or Inkscape export carries XML comments, editor namespaces (inkscape:, sodipodi:, data-name), metadata blocks, empty groups, unused definitions and coordinates with eight decimal places. None of it affects how the image renders, and together it is usually 40–70 % of the file. The optimizer strips it, rounds coordinates to the precision you choose, collapses redundant structure and re-serialises the file with minimal whitespace.

It runs SVGO 4 — the same engine bundled with most front-end build tools — compiled to run inside your browser. Files are read by your browser, processed in a background thread, and offered back as downloads; nothing is sent anywhere. You can drop a single file, select a folder, or paste SVG markup straight from another tab.

Choosing a level

  • Safe removes only things that cannot change rendering: comments, metadata, editor attributes, unused defs, hidden elements, and excess numeric precision. Shapes stay shapes, groups stay groups, styles stay where they are. Use it for illustrations or anything you will edit again.
  • Balanced is SVGO's default preset with two changes: the viewBox is always kept, and ids and titles are preserved. It merges adjacent paths, converts rect/circle to paths where smaller, moves shared attributes to groups and inlines simple styles. Output is visually identical in practice. This is the right choice for icons and web assets.
  • Aggressive additionally removes ids, classes, data-* attributes, titles and descriptions, embedded raster images and scripts, and drops precision to two decimals. Use it for icon sets you will not target with CSS or JavaScript.

Options explained

  • Precision — decimal places kept for coordinates. Three is invisible at any normal size; two is fine for icons under 100 px; one starts to show on curves.
  • Keep ids — leave id attributes in place. Needed if CSS, JavaScript or <use href="#…"> references them.
  • Keep title/desc — preserve the accessible name. Keep this on for inline SVGs that carry meaning; off for decorative icons.
  • Remove width/height — strip the fixed pixel size so the SVG scales to its container. The viewBox provides the aspect ratio. Recommended for icons used in HTML/CSS.
  • Pretty print — indent the output for reading instead of minifying it. Slightly larger files.

What it will not do

It does not rasterise, recolour, resize or redraw anything — see SVG to PNG and SVG Color Changer for those. It does not fix broken SVGs: a file that fails to parse is reported as failed and left alone. And it never removes the viewBox, so an optimised icon scales exactly as the original did.

Frequently asked questions

Will optimising change how my SVG looks?

At the Safe level, no — it only removes data that never renders (comments, editor metadata, unused definitions) and rounds coordinates to three decimals, which is below screen resolution at any realistic size. Balanced adds transformations that are visually identical in practice, such as merging adjacent paths and converting basic shapes to paths. Aggressive can drop things you might need, like id attributes and title text, so use it only for icons you will not script or style externally.

Why does the optimiser keep the viewBox when other tools remove it?

Removing the viewBox saves a few bytes and breaks scaling: without it an SVG can no longer resize to its container and icons render at a fixed size. Every level here keeps it. The Remove dimensions option does the opposite — it strips the fixed width and height so the icon fills whatever box you put it in.

Is this the same as SVGO?

Yes. The optimiser runs SVGO 4, the same engine used by build tools such as Vite and webpack, compiled to run in your browser. The difference is the presets: SVGO’s defaults remove the viewBox, this tool never does, and the Safe level disables every plugin that can alter rendering.

Are my files uploaded anywhere?

No. Processing happens in a Web Worker inside your browser tab. You can disconnect from the internet after the page loads and the tool keeps working. Nothing is stored, logged or sent to a server.

How many files can I optimise at once?

There is no limit on the number of files. Practically, a few hundred icons process in seconds on a laptop; very large illustrations (several megabytes each) are slower because they are parsed and re-serialised in full. Files are processed one at a time so the page stays responsive.

Your files never leave your device

Most online converters upload your file to a server. InfyTool ships the actual encoders to your browser as WebAssembly instead, so processing happens inside your tab — faster for batches, and nothing to delete afterwards.

  • No upload, ever. Turn off Wi-Fi after the page loads and every tool keeps working.
  • No limits. No file-size cap, no queue, no watermark, no account.
  • Runs on your CPU. Batches use several cores in parallel; nothing is throttled.

More free tools

Need icons or SVGs to start from?

InfyTool is built by the same team as these free libraries.