SVG to PNG Converter

Convert SVG files to PNG or JPEG in the browser. Set custom scale, dimensions, and background color — all client-side.

About This Tool

The SVG to PNG Converter is a free, browser-based tool that transforms Scalable Vector Graphics into raster images (PNG or JPEG) without uploading anything to a server. Whether you need to generate retina-resolution app icons from a vector source, prepare images for a platform that does not support SVG, or quickly export a design mockup, this tool handles it in seconds.

All conversion happens entirely on your device using the HTML5 Canvas API. When you provide an SVG — either by pasting the code or uploading a file — the tool creates an Image element with the SVG content encoded as a data URL. Once the image loads, it is drawn onto an off-screen <canvas> at your chosen dimensions and scale factor. The canvas is then exported as a PNG or JPEG blob using canvas.toBlob(), ready for download.

Because everything runs client-side, your SVG data never leaves your machine. There are no network requests, no temporary storage, and no third-party services involved. This makes the tool safe for proprietary designs, brand assets, or any SVG content you prefer to keep private. It even works offline once the page has loaded.

The tool automatically detects the intrinsic dimensions of your SVG from its width, height, and viewBox attributes. If only a viewBox is present (common with design tools like Figma or Illustrator), the tool injects explicit dimensions so the browser renders the SVG at the correct size. You can then scale the output to 2x, 3x, 4x, or any custom factor for retina displays, or override with specific pixel dimensions.

For PNG output, transparency is preserved by default — ideal for logos and icons. You can optionally set a solid background color. For JPEG output, a quality slider lets you balance file size against visual fidelity, with the output dimensions and file size displayed in real time.

How to Use

  1. Drag and drop an SVG file onto the upload zone, click to browse your files, or paste SVG code directly into the textarea.
  2. Review the SVG preview and intrinsic dimensions displayed below the input area.
  3. Choose a Scale factor (1x, 2x, 3x, 4x, or custom) to multiply the SVG dimensions. Alternatively, enter a specific Width or Height in pixels to override the scale.
  4. Set the Background — transparent by default (PNG only), or pick a custom color. For JPEG, a background color is required since JPEG does not support transparency.
  5. Select the Output Format (PNG or JPEG). If JPEG is chosen, adjust the Quality slider to control compression.
  6. The converted image appears automatically in the output preview. Click Download to save the file, or Copy to copy the image to your clipboard. Use Ctrl+Shift+C as a keyboard shortcut.

FAQ

Is my SVG data kept private?

Absolutely. All processing happens entirely in your browser using the Canvas API and Image element. Your SVG data is never uploaded to any server. There are no network requests, no cookies, and no tracking of your files. You can even use this tool offline after the page has loaded.

Why does my SVG render at the wrong size?

This usually happens when the SVG lacks explicit width and height attributes and only has a viewBox. The tool automatically injects width and height from the viewBox when they are missing. If the output is still unexpected, try setting a custom width or height in the conversion settings to override the intrinsic dimensions.

What is the difference between PNG and JPEG output?

PNG supports transparency and uses lossless compression, making it ideal for icons, logos, and graphics with sharp edges or text. JPEG uses lossy compression and does not support transparency (transparent areas become white), but produces smaller files for photographic or gradient-heavy images. Use the quality slider to control JPEG compression.

How does the scale factor work?

The scale factor multiplies the intrinsic dimensions of the SVG. For example, a 100x100 SVG at 2x produces a 200x200 pixel image. This is useful for generating retina-ready assets (@2x, @3x) from vector sources. You can also enter custom dimensions to override the scale entirely.

Can I convert SVGs with external resources like fonts or images?

SVGs that reference external resources (linked images, web fonts, CSS stylesheets) may not render correctly because the browser blocks cross-origin requests from data URLs for security reasons. For best results, embed all resources directly in the SVG — use inline styles, data URI images, and embedded font definitions.

What is the maximum SVG size I can convert?

There is no hard file-size limit, but very large or complex SVGs may take longer to render depending on your device. The output canvas size is limited by your browser — most browsers support canvases up to around 16,384 x 16,384 pixels. For extremely high resolutions, consider reducing the scale factor.

How do I get a transparent background?

Transparent backgrounds are the default when outputting as PNG. Simply leave the Transparent checkbox enabled. If you switch to JPEG format, transparency is not supported — the background will be filled with white unless you choose a custom background color.

Related Tools