🖼️ SVG to PNG Converter

📐 工作原理與說明
把 SVG 程式碼包成 image/svg+xml 型別的 Blob 並建立物件 URL,交由 Image 非同步載入;畫布畫素 = 設定寬高 × 匯出倍率(1x/2x/3x),背景預設透明、可選白色(僅選白色時鋪底,避免透明 SVG 被刷白);適配模式預設「保持比例」居中繪製並保留多餘畫布、可選「拉伸鋪滿」拉伸至畫布尺寸;匯出 PNG data URL 後立即釋放物件 URL,載入失敗提示 SVG 載入失敗
本工具為純前端線上工具,資料在瀏覽器本地處理、不上傳伺服器,依據對應領域標準與規範進行計算或處理,結果僅供參考。 工具名稱:SVG 轉 PNG - 免費圖片處理工具,線上SVG 轉 PNG,免費使用。

Rasterise a vector SVG into a PNG with a chosen size and background for contexts that cannot render SVG, processed locally.

輸出畫素:

請輸入 SVG 程式碼並點選轉換

📚 深度解析:SVG 轉 PNG

💡 常見使用場景

  • 圖標出圖。
  • 素材轉換。
  • 設計交付。
SVG 轉 512 PNG

輸入:上傳 SVG、512px。

處理:canvas 繪製。

輸出:PNG 下載。

❓ 常見問題(FAQ)

透明保留嗎?
預設匯出透明背景;把「背景」切到白色即可得到白底 PNG。
透明能保留嗎?
預設保留透明通道,只有選擇白色背景時才鋪白底。
會儲存或上傳我的內容嗎?
結果以瀏覽器即時計算為準,純前端本地處理、資料不上傳;生成的樣式與程式碼僅作快速產出參考,正式專案請以設計系統、規範與瀏覽器實測為準。

Formula & Standard References

Item Formula / Note Source / Standard
Raster size canvas pixels = width × height × scale; contain keeps aspect ratio centered, stretch fills the canvas W3C SVG 1.1
Text as paths convert text to outlines to avoid font substitution W3C SVG 1.1
Density and DPI raster clarity depends on pixel count, not the DPI tag Print production convention
⚠️ 使用說明與注意事項