PNG to SVG
Vectorize bitmaps: color quantization + contour tracing + smoothing
PNG to SVG is a free online Image tool. Vectorize bitmaps: color quantization + contour tracing + smoothing Related terms: png · svg · 矢量化 · vector · vectorize · 位图. Use it on this page without signing in.
原图 · demo.jpg
拖放图片到页面任意位置即可重新矢量化
SVG 结果
使用说明
- 上传一张 PNG/JPG 位图(logo、图标、插画等色块分明的图效果最佳)
- 工具自动执行矢量化,右侧实时显示 SVG 预览
- 调整四个滑块微调效果:颜色数量、简化容差、斑点清理、曲线平滑
- 点击色板复制颜色 hex,最后「下载 SVG」或「复制 SVG 代码」
常见问题
- 什么样的图片适合? 色块分明的 logo/图标/插画效果最好;照片类渐变丰富的图色块会很多,不建议
- 边缘有白缝? 工具用分层堆叠掩码,下层色块延伸到上层之下,已消除抗锯齿白缝
- 图片会上传吗? 不会,量化/描摹/生成全程在浏览器本地完成
算法原理
- 颜色量化:中位切分(median cut),按盒内平方误差选切分对象,近色合并
- 分层堆叠掩码:颜色按占比降序分层,下层延伸到上层之下消除白缝
- 轮廓追踪:裂缝跟随(crack following),右转优先链接闭合回路,支持孔洞
- 路径简化:闭合折线的 Ramer–Douglas–Peucker,容差可调
- 曲线平滑:顶点两侧收缩为二次贝塞尔端点,长直边保持笔直
More Image
View allImage Compressor
Compress JPG / PNG / WebP, custom quality and dimensions
Image Converter
Convert between JPG / PNG / WebP, HEIC to JPG
Crop Rotate Flip
Crop, rotate and flip images with custom ratios
ID Photo Background
Change ID photo background (blue/white/red), common sizes
Image Watermark
Add text watermarks with custom position, size and opacity
Nine-Grid Split
Split an image into a 3×3 grid for social posts
Image Stitch
Stitch multiple images vertically or horizontally
GIF Maker
Create GIFs from images, adjust frame rate and size
FAQ about PNG to SVG
What can PNG to SVG do?
PNG to SVG is a Image tool. Vectorize bitmaps: color quantization + contour tracing + smoothing You can finish the job on this page.
Who should use PNG to SVG?
Anyone handling png · svg · 矢量化 · vector · vectorize · 位图 who does not want to install desktop software can use PNG to SVG in the browser.
Is PNG to SVG safe? Is my data uploaded?
This tool runs in your browser. We do not collect the content you enter into PNG to SVG just because you used it.
What similar tools exist?
Related tools in the same Image group are listed at the bottom of this page.