RevealTheme logo

SVG优化工具

从SVG标记中移除不必要的元数据、注释和空白字符。

如何使用本工具

  1. 1

    Paste your raw SVG markup into the input box.

  2. 2

    Read the byte count and percentage saved shown above the result.

  3. 3

    Review the minified SVG in the output box to confirm it still renders correctly.

  4. 4

    Click Copy to put the optimized markup on your clipboard.

什么是SVG优化工具?

从Figma或Illustrator等设计工具导出的SVG文件,通常包含浏览器并不需要的编辑器元数据、XML声明和冗长的命名空间。本工具会将它们移除:在视觉上毫无差别的前提下,通常能减小文件大小的20%到60%。

常见使用场景

  • Shrinking icon SVGs exported from Figma before pasting them inline into a React or Vue component.

  • Cleaning up Illustrator output that ships with a verbose XML header and editor comments.

  • Reducing the size of small inline SVGs embedded directly in HTML to trim page weight.

  • Removing designer metadata and indentation before committing icons to a shared repo.

  • Quickly checking how many bytes a given SVG can save before reaching for a heavier build-time tool.

  • Tidying SVG snippets pasted into a CMS or email template where extra whitespace bloats the payload.

常见问题

它和SVGO一样好吗?
SVGO更为激进(路径简化、属性合并)。本工具则在你的浏览器中即时处理最常见的优化项——空白字符、注释、XML头部。

相关工具