跳至主要内容

SVG 转高清 PNG 与多尺寸 ICO 图标生成器

在浏览器中将矢量 SVG 解析光栅化为任意分辨率的高清 PNG,并打包生成符合工业标准的多层 Favicon .ico 图标,100% 本地运算保护数据隐私。

SVG 转高清 PNG 与多尺寸 ICO 图标生成器

100% 浏览器本地运算

在浏览器中将矢量 SVG 解析光栅化为任意分辨率的高清 PNG,并打包生成符合工业标准的多层 Favicon .ico 图标,100% 本地运算保护数据隐私。

拖拽 SVG 文件到此处

或点击从设备选择(单文件最大 10MB)

选择 SVG 文件

矢量图实时安全预览

上传 SVG 文件或粘贴代码以预览并配置导出参数。

光栅化导出为 PNG

px
px

打包生成 Favicon (.ico)

一键生成包含多种主流分辨率的 Windows 标准 .ico 容器,保留 32 位 Alpha 透明度。

How Browser-Based SVG to PNG and ICO Conversion Works

Scalable Vector Graphics (SVG) define two-dimensional graphics using XML-based vector paths. While vectors scale infinitely without loss of fidelity, many web platforms, desktop environments, and mobile applications require fixed-resolution raster bitmaps like PNG or multi-layer ICO favicons. Our generator performs this conversion 100% locally in your browser memory using hardware-accelerated Canvas rendering.

Client-Side Security & Active Content Sanitization

Because SVG is an XML dialect, untrusted SVG files can embed active scripts, malicious event handlers (such as onload or onclick), and remote network trackers. Our sanitization boundary completely disarms vectors before rendering:

  • Script Purging: Strips all <script> elements and removes inline event handlers from all nodes.
  • Zero Network Leakage: Disables external <image>, <use>, and CSS @import or @font-face network URLs, preventing tracking and exfiltration.
  • Safe ForeignObject Handling: Neutralizes embedded HTML markup to ensure zero cross-site scripting (XSS) risk.

Multi-Resolution ICO Favicon Architecture

The Microsoft ICO format encapsulates an ICONDIR header and an array of directory entries pointing to independent image payloads. Modern browsers and operating systems automatically pick the most suitable resolution from this container:

  • 16×16: Classic desktop browser tab favicon.
  • 32×32: High-DPI / Retina tab icon and taskbar shortcut.
  • 48×48: Windows desktop application shortcut and task switcher icon.
  • 64×64 to 256×256: Windows high-DPI desktop view, file explorer previews, and web store assets.

Frequently Asked Questions

我的 SVG 矢量文件会被上传到云端服务器吗?
绝不会。所有 SVG 解析、净化、Canvas 光栅化及 ICO 二进制打包完全在您本机的浏览器内存中运行,无需网络即可离线使用。
工具如何抵御 SVG 恶意脚本执行(XSS 攻击)?
所有输入的 SVG 代码均会经过严格的客户端净化隔离边界,自动过滤所有 <script> 标签、内联事件监听器(如 onload、onclick)、远程网络资源及不安全的 foreignObject 载荷。
为什么导出的 .ico 文件需要包含多种尺寸?
现代网页与操作系统会根据显示场景自动抓取对应尺寸的 Favicon(例如 16x16 适配浏览器标签栏,32x32 适配高分屏,48x48 适配桌面快捷方式)。本工具将选定尺寸打包进同一标准 .ico 文件中。
导出的 PNG 和 ICO 图标是否支持保留透明通道?
默认完全保留 32 位 RGBA Alpha 透明通道,确保图标在深色、浅色或自定义背景的网页上均能完美融合。