SVG Optimizer

不要なメタデータやコメントを削除し、マークアップを簡素化してSVGファイルを最適化します。
最適化オプション
入力
出力

Smart Optimization

Remove bloat from Illustrator, Inkscape, Sketch exports.

Live Preview

Side-by-side before/after SVG rendering.

Size Savings

See exact byte savings and percentage reduction.

Client-side

All processing in your browser. No data uploaded.

SVG Optimizerについて

The SVG Optimizer reduces the file size of SVG images by removing bloat that vector editing tools like Adobe Illustrator, Inkscape, and Sketch add when exporting. Exported SVGs are often 2–5× larger than necessary due to embedded editor metadata, XML declarations, inline comments, unused namespace declarations, empty attributes, default attribute values, and unnecessary grouping elements. Smaller SVGs load faster, reduce bandwidth usage, and improve Core Web Vitals scores. This browser-based tool parses your SVG with the DOM API, applies your chosen optimisation passes, and renders a live side-by-side before/after preview so you can confirm the visual output is unchanged. All processing runs client-side — your SVG code is never uploaded to any server. Typical savings range from 20–60% depending on the source editor.

SVG Optimizerの使い方

  1. Paste your SVG code into the input panel on the left, drag-and-drop an .svg file, or click Upload File.
  2. Choose your optimisation options — start with the defaults which apply safe, non-destructive passes.
  3. Click the Optimize button to run the selected passes and see the result in the output panel.
  4. Review the side-by-side SVG preview to confirm the visual output looks identical to the original.
  5. Check the size savings percentage shown at the bottom — typical results are 20–60% reduction.
  6. Click Copy or Download to save the optimised SVG for use in your project.

よくある質問

Is it safe to remove the XML declaration and metadata?

Yes for web use. The XML declaration (<?xml version="1.0"?>) is not required for SVGs embedded in HTML documents or used as <img> src attributes. Editor metadata (Inkscape namedview, Adobe Illustrator layers) is only used by the editing software and serves no purpose in production SVGs.

Will optimising my SVG break animations or interactive scripts?

The default settings are safe for static icons and illustrations. Be cautious with "Cleanup IDs" if your SVG uses JavaScript or CSS that references specific ID values — removing unreferenced IDs could break those references. Always check the visual preview after optimisation.

What does "Collapse Groups" do?

Empty <g> elements with no attributes are unnecessary wrappers that add file size without any visual effect. Collapsing them moves their children directly into the parent element. Groups with attributes (like transforms, fills, or class names) are preserved.

How does this compare to SVGO?

SVGO is the industry-standard Node.js SVG optimiser and performs more aggressive optimisations including path simplification and number precision reduction. This tool implements a safe subset of SVGO's passes that run entirely in the browser without a Node.js server.

What is the difference between SVG and PNG for web icons?

SVG is a vector format that scales perfectly to any resolution — ideal for logos, icons, and illustrations. PNG is a raster format best suited for photographs or images with complex gradients. SVG files are typically smaller for simple graphics and can be styled with CSS, making them the preferred choice for UI icons.

関連ツール

Favicon GeneratorBarcode GeneratorJSON Formatter