RunLocalTools

SVG to PNG Converter — Any Size, Transparent, Free & Private

Convert SVG to PNG, JPG or WebP at any size or DPI. Transparent background, padding, trim, recolour, batch ZIP and icon sets. Free, runs in your browser.


What it does

This tool turns SVG vector files into PNG, JPG or WebP images. Drop in one SVG or many, choose a size, and download the result. Because SVG is resolution-independent, the export is crisp at any size: 16 px for a favicon or 8000 px for a print.

You can paste SVG code instead of uploading a file, edit that code live, and see the result on a checkerboard, light, dark or custom backdrop.

What you can control:

  • Size: a scale multiplier (1×–64×), an exact width, an exact height, a box to fit inside, or a print size in DPI.
  • Background: transparent, a solid colour, or a two-colour gradient. Corners can be rounded.
  • Padding and trim: add space around the artwork, or crop away empty edges first.
  • Rotate and flip: 90° steps, horizontal and vertical flip.
  • Colours: every plain colour in the SVG is listed, and you can swap any of them. currentColor can be set too.
  • Output: PNG, JPG or WebP, with an optional DPI tag, your own file-name pattern, and a copy-to-clipboard button.
  • Batch and icon sets: convert many files at once into one ZIP, or export a whole favicon / app-icon size set from a single SVG.

How it works

Your browser already knows how to draw SVG. The tool rewrites the SVG’s root tag so it has an explicit size and viewBox, hands it to the browser as an image at exactly the pixel size you asked for, and draws it onto a canvas. Rendering at the final size, rather than enlarging a small bitmap, is why the edges stay sharp.

A few details that matter:

  • Messy SVGs are handled. Files with only a viewBox, sizes in mm, pt or em, percentage sizes, a missing namespace, or no size information at all are measured and repaired before drawing.
  • Trim draws the art once at a moderate size, finds the visible pixels, then re-renders using a tighter viewBox, so trimmed output is still vector-sharp.
  • DPI is written into the file itself: a pHYs chunk in PNG and the density fields in JPG. Print software then reads the right physical size. In Print mode the pixel size is also derived from the DPI (the SVG is treated as 96 px per inch).
  • Size limits are checked before drawing. The browser’s canvas cap is 16,384 px per side, and the tool tells you plainly when a setting goes over.

How to use it

  1. Drop SVG files onto the page, click to choose them, or press Paste SVG code… (or Ctrl/⌘+V) and paste markup.
  2. Pick a size mode in the right-hand panel and enter a value. The preview and the output size update as you type.
  3. Set the background, padding, rotation and format you want. Use the Colours list to recolour the artwork if needed.
  4. Press Download. For several files, press Download all as ZIP. For app icons, choose an icon set and press Download icon set (ZIP).

Your files and settings are remembered in this browser, so a refresh does not lose your work. Use Clear saved files to remove them.

Icon sets and file names

The icon-set export fits your SVG into square canvases using your padding, background and corner settings. Presets cover web favicons plus touch/Android icons, PWA icons, iOS app-icon sizes and social avatars, or you can type your own list such as 16, 32, 64x64, 512. These are PNG files. For a dedicated favicon workflow, the Favicon generator and the app icon set tool start from a raster image instead.

File names follow a pattern with {name}, {scale}, {w}, {h} and {dpi}, for example {name}@{scale}x. Duplicate names are numbered automatically.

Before and after you export

If the SVG itself is heavy, the SVG optimizer & minifier trims it before you convert. After exporting a large PNG, the Compress tool can shrink the file further.

FAQ

Can I get a transparent PNG? Yes. Transparent is the default background. Anything the SVG does not paint stays see-through. Choose a solid colour or gradient if you want a filled background. JPG cannot store transparency, so transparent areas turn white there.

How big can the PNG be? Up to 16,384 px on either side, which is the browser’s canvas limit. Very large images (tens of megapixels) can be slow or fail on phones. The tool shows the exact pixel size and warns you before you export.

Why is something missing from my exported image? SVGs can link to outside images, fonts or stylesheets. A browser never loads those into an image export, so they disappear. The tool warns you when it finds such links. Fix it by embedding the image as a data: URI, or by converting text to outlines in your design app. Fonts installed on your computer do work.

Does it set the right DPI for printing? Yes. Choose Print size (DPI), enter 300 for example, and the PNG is sized and tagged accordingly. In the other modes you can still write a DPI tag. WebP files do not carry a DPI tag.

What is the difference between PNG, JPG and WebP here? PNG is lossless and supports transparency. JPG is smaller for photographic backgrounds but has no transparency. WebP is small and supports transparency, but it is not supported by every older program. If a browser cannot encode WebP, the tool falls back to PNG and tells you.

Is my SVG uploaded anywhere? No. Conversion happens in your browser tab. See the Privacy section.

Privacy

Converting SVG to images is fully local. Your files are read and drawn inside your browser, and nothing is uploaded. No feature in this tool uses the internet.

  • Files you add are saved in your own browser storage (IndexedDB) so they survive a refresh. This never leaves your device, and you can turn it off in the toolkit settings or press Clear saved files at any time.
  • The first time you download a ZIP, a small open-source library (JSZip) is loaded. While libs.js has vendored:false, say: “the first ZIP download fetches that library from a public CDN, then it works offline; none of your files are sent.” Once vendored:true, say instead: “the library is served from this site, and the tool can be saved for offline use.” (Confirm which applies when publishing.)

Supported formats and limitations

  • Input: .svg, .svgz (compressed SVG), pasted SVG code. UTF-8 and UTF-16 files are read correctly.
  • Output: PNG, JPG, WebP; ZIP for batches and icon sets. No .ico files.
  • Not loaded into the image: linked images, remote fonts and stylesheets; SVG scripts never run.
  • <foreignObject> (HTML inside SVG) may fail to export in some browsers, notably Safari.
  • Maximum: 16,384 px per side; files over 100 MB are rejected.
  • Custom preserveAspectRatio: works, but Trim is skipped for those files.