Skip to main content

Opzioni ottimizzazione

Originale362 B
Ottimizzato187 B
Riduzione-48%

SVG Input

362 B

SVG Ottimizzato

187 B (-48%)
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><g id="layer1"><circle id="circle1" cx="50" cy="50" r="40" fill="#58a6ff" stroke="none" /></g></svg>

View Preview

Come utilizzare SVG Optimizer

Attach or load your SVG

Attach SVG code to editor or upload an .svg file with the upload button: Preloaded example SVG is already included.

Choose optimizations to apply

Activate or deactivate removal of comments, metadata, empty groups, collapse whitespace, round decimals, default attributes, minify IDs and hidden elements.

Read weight loss reduction

Compare original size and optimized size in bytes/KB and percentage reduction, with a visual preview of the resulting SVG.

Copy or download optimized SVG

Copy optimized code to notes or download it directly as a new .svg file ready for your project.

Suggerimenti

  • Activate "Minify ID" only if your SVG is not referenced by external CSS via those IDs to avoid breaking linked styles.
  • Reduce decimal precision to 1-2 digits for simple icons: achieve significant weight reduction without perceivable visual impact.
  • Always verify the preview after optimization before replacing the original SVG in your project, especially if you use aggressive options like "Remove hidden elements".

Domande frequenti

What optimizations does the tool apply?

Remove comments, metadata/title/desc, empty groups, collapse whitespace, round decimals, remove attributes with default value, minify IDs and hide elements removal: each option is individually toggleable.

Is SVG output safe to paste into a webpage (XSS risk)?

Yes: output is always sanitized removing script tags, handlers on* inline and href/src with schema javascript: or data:text/html, as well as iframe and foreignObject tags, regardless of the chosen optimization options.

How is the percentage of reduction calculated?

Byte size comparison - Optimized vs Original SVG.

Can I load an SVG file instead of pasting the code?

Yes, through the file upload button: content is read and automatically inserted into the editor, ready for optimization.

What does the "Minify ID" option do?

Replaces every original ID with a short progressive identifier (e.g. i0, i1), updating all URL references (#id) and href="#id" correspondingly to avoid breaking gradients and masks.