SVG 转 PNG
将独立的 SVG 渲染为 PNG;拒绝外部资源。
输入
提示:按 Ctrl + Enter 运行
已保存的设置
下方的详细帮助目前仅提供英文版。
关于此工具
SVG graphics scale to any size, but many places (social media, office documents, app stores, some email programs) need a PNG. This tool renders an SVG on our server with CairoSVG and gives you a PNG at the pixel width you choose.
For safety, SVGs that reference external resources (linked images, external stylesheets, @import, scripts, foreign objects, data URLs) are rejected. Logos and icons exported from design tools as plain SVG usually work fine.
使用方法
- Choose an SVG file (up to 1 MB).
- Enter the output width in pixels, for example 1200.
- Run it and download the PNG.
计算原理
The SVG is parsed with defusedxml and checked for disallowed elements and attributes. It is then rendered by CairoSVG at the requested width onto a square canvas of that size and saved as PNG with transparency.
计算示例
A start-up founder needs a 1200-pixel PNG of the company’s square SVG logo for a pitch-deck template. Rendering at width 1200 gives a crisp, transparent PNG. An SVG exported with an embedded linked photo is rejected; re-exporting it with the image embedded as paths solves it.
局限性
- The output canvas is square at the chosen width; non-square SVGs may be scaled to fit it.
- No external resources, styles or fonts.
- Maximum 1 MB SVG and 5000 px output.
最后更新:
常见问题
Why was my SVG rejected?
It references external files, scripts, CSS or embedded data, which are blocked to prevent unsafe content.
Are custom fonts supported?
Convert text to outlines (paths) in your design tool for reliable results.
Is transparency kept?
Yes, transparent areas stay transparent.
故障排除
Text is missing or in the wrong font.
Outline the text in your design tool.
The image looks distorted.
Use a square SVG or add padding to make the viewBox square.
External resource error.
Remove linked images or CSS and embed shapes directly.
隐私 & 免费使用
我的输入会被保存吗?
此工具会将文件或输入上传到我们的隔离处理器。任务完成后会删除工作文件。请勿提交敏感或机密材料。
这个工具免费吗?
是的。无需注册或付费。