✍️
SVG最適化ツール
サニタイズ済み アイコン向けSVGファイルを最適化・整理します。
Input bytes
0
Output bytes
0
Colors
0
ViewBox
—
Colors
fill/stroke/stop-color
Preview an SVG to extract colors.
Preview
No preview yet.
Output SVG
Sanitization
SVG can execute scripts or load external resources. This tool sanitizes the markup before preview and removes risky elements/attributes.
- Removes
<script>,<foreignObject>, and event handler attributes (on*). - Strips external
href/xlink:hrefunless it’s an internal#idreference.
What is SVG?
SVG (Scalable Vector Graphics) is an XML-based vector image format for two-dimensional graphics with support for interactivity and animation. Unlike raster formats like JPEG or PNG, SVGs are defined by mathematical paths, which means they can be scaled to any size without losing quality. This makes them perfect for logos, icons, and illustrations on the web, where they remain crisp on everything from mobile screens to high-resolution desktop monitors.
How to Use This Tool
Paste your SVG code into the SVG Input text area on the left. Click Preview to see the graphic and extract its color palette. Use the Optimize or Minify buttons to clean up the markup and reduce file size. Optionally, replace specific colors by entering new values in the Colors panel and clicking Apply. Click Copy or Download to save your sanitized and optimized SVG.
Common Use Cases
Icon management to clean up SVGs exported from design tools like Figma or Illustrator. Theming to quickly change the colors of an icon set to match your brand palette. Security to sanitize SVGs from untrusted sources to remove potential scripts or external references. Performance to minify SVG markup to reduce the size of inline graphics and improve page load times.
Pro Tips
Use the currentColor button to convert all explicit fills and strokes to currentColor, making your SVG easily styleable via CSS. Always optimize your SVGs before using them in production to ensure they are as small as possible. When creating SVGs in design tools, use Outline Stroke and Simplify Path features to reduce the complexity of the generated code before optimization.