🖼️ SVG to PNG Converter

Convert SVG files to PNG images at any resolution. Set custom width and height, preserve transparency. Free online SVG to PNG converter — instant, no signup required.

or upload .svg file
Preview will appear here

How to Use

1

Upload or paste SVG

Drop your .svg file onto the upload area, or paste raw SVG code into the text area below.

2

Set the output size

Choose a scale multiplier (1x, 2x, 3x) or enter custom pixel dimensions for the PNG output.

3

Convert and download

Click Convert to PNG. Preview the rendered image and click Download PNG to save it.

Frequently Asked Questions

What is the difference between SVG and PNG? +
SVG is a vector format — it uses mathematical paths so it scales perfectly at any size with no quality loss. PNG is a raster format made of pixels. SVG is ideal for logos and icons; PNG is needed for apps, social media, and most web contexts that do not support SVG.
Can I choose the output resolution? +
Yes. Use the Scale multiplier to set the output size. 1x uses the SVG's natural dimensions, 2x doubles it (good for Retina displays), and you can type any custom width/height in pixels.
Why does my SVG look different after conversion? +
Some SVG features like external fonts, filters, or linked resources may not render correctly in the browser's SVG renderer. For best results, make sure all fonts are embedded and all resources are inline in the SVG.
Is there a file size limit? +
There is no hard limit, but very large SVGs or very high scale multipliers may use significant browser memory. For SVGs over 1MB, a scale of 1x or 2x is recommended.
Is my SVG file sent to a server? +
No. All conversion happens in your browser using the HTML5 Canvas API. Your SVG file is never uploaded or sent anywhere.


Complete Guide: SVG to PNG Converter

SVG (Scalable Vector Graphics) is the ideal format for logos, icons, and illustrations that need to look sharp at any size. But there are many situations where you need a raster PNG instead — email clients that don't support SVG, iOS app icon requirements, legacy content management systems, or third-party services that accept only raster images. This guide covers everything you need to know about converting SVG to PNG at the right dimensions and quality.

When You Need PNG Instead of SVG

SVG viewport vs viewBox

Understanding these two attributes is critical for correct conversion. The viewport is the outer dimensions defined by the width and height attributes on the <svg> element — this is how large the SVG renders in its default context. The viewBox attribute defines the internal coordinate system: viewBox="0 0 100 100" means the SVG's internal canvas runs from 0 to 100 in both axes, regardless of the rendered size. When converting, you should respect the viewBox aspect ratio to avoid stretching the image.

DPI/PPI for Print-Ready Exports

Screen resolution is typically 72 or 96 DPI. Print requires 300 DPI minimum for sharp results. To create a print-ready PNG from an SVG intended for a 2-inch width at 300 DPI, you need 600 pixels wide (2 inches × 300 DPI). Always multiply your intended physical size by the target DPI to calculate the required pixel dimensions before conversion.

Canvas Rasterization Process

Browser-side SVG-to-PNG conversion uses the Canvas API:

  1. Create an <img> element and set its src to the SVG (either a URL or a Blob URL)
  2. Wait for the image's load event
  3. Create a <canvas> with the desired output pixel dimensions
  4. Call ctx.drawImage(img, 0, 0, width, height)
  5. Export with canvas.toBlob(callback, 'image/png')
const img = new Image();
img.onload = () => {
  const canvas = document.createElement('canvas');
  canvas.width = 512;
  canvas.height = 512;
  const ctx = canvas.getContext('2d');
  ctx.drawImage(img, 0, 0, 512, 512);
  canvas.toBlob((blob) => downloadPng(blob), 'image/png');
};
img.src = svgBlobUrl;

Preserving Transparency

PNG supports full alpha channel transparency, and the Canvas API preserves it. By default, a new canvas has a transparent background. Do not call ctx.fillRect with white before drawing if you want to keep the SVG's transparent areas transparent in the output PNG. If you need a white background (for JPEG conversion, for example), explicitly fill the canvas with white first.

External Resources and the CORS Problem

SVG files can reference external resources using <image href="https://...">, external fonts via <link> or @import, or linked SVG symbols. When rasterizing with Canvas, external resources that violate CORS policy will fail silently or taint the canvas, making it impossible to export. The canvas will throw a SecurityError when you try to call toBlob() on a tainted canvas. The fix is to inline all resources before conversion — embed fonts as Base64 data URIs and inline any referenced images.

For generating multiple icon sizes from a single SVG, see the Favicon Generator. To reduce PNG file size after conversion, run it through the Image Compressor.

🧰 50+ Tools