SVG to PNG Converter - Vector to Raster
Convert SVG files to PNG at any scale (1x-4x). Upload a file or paste SVG code with transparent or custom background.
Runs in your browser. No data leaves your device.
About this tool
Turns SVG vector graphics into PNG images in the browser. Upload an .svg file or paste SVG markup. The tool works out the size from the width/height attributes or the viewBox, then the browser draws it onto a canvas at the scale you choose, with a transparent or solid-color background.
Features
- Two input tabs: Upload File or Paste Code
- Automatic size detection: width/height attributes converted to pixels (px, pt, pc, mm, cm, in), the viewBox for a missing side or for relative sizes like 100%, then a 300x150 fallback; the detected size is pinned on the SVG so every browser draws it
- Live preview on a checkerboard background
- Scale presets 1x, 2x, 3x, 4x, or a custom pixel width that keeps the aspect ratio
- Background: transparent or a custom color
- Shows the PNG dimensions and file size
- Sizes above this device's canvas limit are reduced to the largest size that fits, with a note; the custom-width hint warns before you convert
- The vectors are redrawn at the target size rather than a small bitmap being stretched
How to use it
- Upload an .svg file or switch to Paste Code and paste the markup
- Check the detected size and the preview
- Choose a scale or enter a custom width
- Choose a transparent or colored background
- Click Convert to PNG, then Download PNG
Inputs
- .svg files up to 10 MB
- Pasted SVG markup (must parse as valid XML with an <svg> root)
Outputs
- PNG named after the uploaded file (logo.svg -> logo.png), or svg-export.png for pasted code
- Transparent background kept unless a custom color is chosen
Limits and notes
- Canvas size limits: about 268 million pixels and 32,767 px per side on desktop Chrome/Edge/Safari, about 125 million pixels in Firefox, 16.7 million pixels on iPhone/iPad and a 67 million pixel budget on Android
- If the browser still cannot create the PNG (for example, out of memory) an error is shown asking for a smaller size
- SVGs that reference external images or fonts may render without them, because the SVG is drawn through an image element
- Nothing is stored locally
Frequently Asked Questions
How does the SVG to PNG Converter work?
The SVG markup is parsed with DOMParser to read its size: width/height in px, pt, mm, cm or in, with the viewBox filling in a missing or percentage side. The SVG is then converted to an object URL blob and loaded into an Image element. Once the browser rasterizes the vector graphic, it is drawn onto an HTML Canvas at the target scale (1x-4x) using drawImage(). The canvas is exported as a PNG blob via toBlob(), preserving transparency unless a custom background color is filled first.
Why convert SVG to PNG?
Some platforms and applications do not support SVG. PNG gives you a raster image that works everywhere -- social media, presentations, documents, and email. Converting at 2x or higher scale ensures crisp output.
Can I choose the output resolution?
Yes. Pick 1x, 2x, 3x or 4x scale, or choose Custom width and enter an exact pixel width; the height follows the aspect ratio. For example, a 100x100 SVG at 2x becomes a 200x200 PNG. The vectors are redrawn at the new size, so edges stay sharp.
Can I paste SVG code directly?
Yes. Either upload an SVG file or paste raw SVG code into the text area. Both methods produce the same PNG output. Pasting code is convenient when you are working with SVG in a code editor.