PNG 转 ICO 转换器:制作 favicon.ico
将 PNG、JPG、SVG 或 WebP 图片转换为包含多种尺寸的 .ico 文件,用作网站图标(favicon)或 Windows 图标。非正方形图片会居中放在透明的正方形画布上。
输入
提示:按 Ctrl + Enter 运行
已保存的设置
下方的详细帮助目前仅提供英文版。
关于此工具
A favicon is the little icon shown in browser tabs and bookmarks. Many sites still provide a favicon.ico file, which can contain several sizes in one file so that each place it appears gets a sharp version. Windows application and folder icons also use .ico files, with sizes up to 256 × 256 pixels.
This tool builds a multi-size ICO from your image: 16, 32 and 48 px for a favicon, 16 to 256 px for Windows, or all sizes. Non-square images are centred on a transparent square so they are not stretched.
使用方法
- Choose a square logo or icon image (PNG with transparency works best).
- Choose favicon sizes, Windows sizes or all sizes.
- Run it and download favicon.ico.
- Upload it to your site’s root folder or reference it with a link rel="icon" tag.
计算原理
The image is drawn at each target size on a transparent canvas with high-quality scaling and stored as PNG-compressed images inside a single ICO container with a directory entry per size.
ICO = header + one PNG per size计算示例
A small bakery’s website uses a 512 × 512 PNG logo. Choosing favicon sizes produces one favicon.ico containing 16, 32 and 48-pixel versions. Placed at the site root, it appears in browser tabs and bookmarks; the same PNG can also be used directly for the larger app icons modern browsers request.
示例输入和结果
选择文件并点击“运行”。转换后的文件会直接从浏览器下载。
局限性
- Square output only; non-square images get transparent padding.
- Does not generate Apple touch icons or web manifest files.
- Very detailed images lose detail at 16 px.
最后更新:
常见问题
Do I still need favicon.ico?
Modern browsers accept PNG and SVG favicons via a link tag, but favicon.ico at the site root is still requested by many tools and older browsers.
Why does my favicon look blurry?
Detailed logos do not scale well to 16 px; a simplified mark works better.
Can I use an SVG?
Yes, it is rasterized at each size.
故障排除
The old favicon still shows.
Browsers cache favicons aggressively; clear the cache or open a private window.
The icon has a white box.
Use a source image with a transparent background.
Windows shows a generic icon.
Choose Windows sizes so that 256 px is included.
隐私 & 免费使用
我的输入会被保存吗?
你的数据只保留在此标签页中。我们不会收到你的文件、粘贴的文本或计算数值。
这个工具免费吗?
是的。无需注册或付费。