Tool overview
什么是SVG 优化器?
SVG 优化器是一款帮助您压缩并优化 SVG 标记的开发者工具。
为什么使用SVG 优化器?
在需要压缩并优化 SVG 标记时提升可读性与效率,且不会将数据上传到服务器。
核心功能
即时语法高亮、错误捕获、客户端隐私保护与一键复制。压缩并优化 SVG 标记
使用方法
按照以下步骤使用上方工具并获得准确结果。
- Paste SVG markup or upload from disk.
- Optimize to strip comments, metadata, and redundant whitespace.
- Download smaller SVG for inline sprites or icon fonts.
SVG Optimization Scope
Safe minification transforms applied.
| 功能 / 场景 | 有效语法示例 | 常见陷阱 / 无效示例 |
|---|---|---|
| Comments | <svg></svg> | <!-- comment -->Comments are removed. |
| Metadata tags | <svg viewBox='0 0 24 24'> | <metadata>...</metadata>Editor metadata may be stripped. |
| Whitespace | Compact single-line SVG | Pretty-printed indentInsignificant whitespace collapses. |
常见问题
关于常见调试问题和数据隐私的可展开解答。
官方文档与参考
本工具的权威规范与平台文档。