OnlineTextLab
Esc

SVG to PNG Converter

Render vector art to a sharp PNG at exactly the pixel size you need, from a file or pasted code.

Drop your SVG files here

Or paste it with Ctrl V

or drop them here, or paste from the clipboard

Choose the exact pixel size you need. Vector art stays sharp at any size.

Or paste SVG code

Runs on your device. Your files and text are not uploaded.

About SVG to PNG

SVG is ideal for logos and icons, but plenty of places won't accept it: social media, document editors, app stores, many upload forms. PNG works everywhere, so the job is to pick the right pixel size and export once.

Because the source is vector, an SVG doesn't have a fixed resolution. A 24 px icon can be exported at 2048 px with perfectly clean edges, which is not something you can do by enlarging a PNG. It's the export step designers and developers keep needing without opening a design app.

Select one or several SVG files, or paste markup directly. A batch uses one width with each file keeping its own proportions, then goes into a ZIP.

How it works

First the markup is cleaned: scripts, event handlers and embedded page content are stripped. Then the tool reads the width, height and viewBox to find the natural shape, including units such as mm and pt, and writes your chosen size into the SVG. If the file has no viewBox, it adds one, because without it the art would clip at larger sizes rather than scale.

Your browser's own SVG renderer draws the result to a canvas at exactly that size, and the canvas is saved as PNG with its transparency intact. Files smaller than 512 px start at a 1024 px export so the first result isn't tiny.

Browsers don't fetch anything external when an SVG is drawn this way. So the page looks for linked images and web fonts, and warns you if it finds any, rather than leaving you to discover missing parts in the output.

How to use SVG to PNG

  1. Press Select SVG files, or open Or paste SVG code. Try an example shows it working.
  2. Press a Width presets number, or type a Width or Height. With the link button on, the other side follows.
  3. Under Background, keep Transparent or choose a solid color.
  4. Press Download PNG, or Download all as ZIP if you selected several SVG files.

A real run

Input
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 80"><rect width="120" height="80" rx="10" fill="#14532d"/><circle cx="40" cy="40" r="22" fill="#fde047"/><path d="M66 58 86 24l18 34z" fill="#f8fafc"/></svg>

This 214 byte file started at 1024 × 683 and rendered to a 36.6 KB PNG. Pressing 2048 under Width presets gave 2048 × 1365 at 99.1 KB, with the height following automatically and edges that stayed clean.

When it helps

  • Exporting a logo at 2048 px for a press kit or a social profile.
  • Getting icon artwork into PowerPoint or Google Docs, where SVG support is limited.
  • Producing app store or browser extension images in several exact sizes.
  • Checking how markup generated by your code really renders.
  • Converting a folder of icon SVGs in one go, with all of them the same width.

Tips for a better result

  • Turn text into outlines in your design app before exporting. Web fonts can't load here, so live text falls back to an installed font.
  • Embed bitmap images in the SVG as data URIs rather than linking to them, or they will be missing from the PNG.
  • Export larger than you think you need. It's cheap, and a high-density display needs about twice the displayed size.
  • Is this for a site icon? The Favicon Generator makes every size at once from the same SVG.

Good to know

  • External images, web fonts and @import stylesheets are not loaded. Browsers block them when drawing an SVG as an image.
  • foreignObject content is removed, since it can't be safely drawn on a canvas in all browsers.
  • Animations do not carry over. The PNG captures a single moment of an animated SVG.
  • Maximum size is 16,384 pixels per side, and memory limits on phones can be lower.
  • Rendering comes from your browser's engine, so complex filters can look slightly different in different browsers.

Questions people ask

Why is my text in the wrong font?

A browser drawing an SVG as an image won't download web fonts, so it uses a font already on your device. Convert text to outlines in your vector editor first, and the export will match on every machine.

What size does an SVG without dimensions get?

With a viewBox, the tool uses its proportions. With neither a size nor a viewBox, browsers assume 300 by 150, so the tool starts from that shape. Either way, you can set the width you want.

Can I get a transparent background?

Yes, by default. Anything your SVG doesn't paint stays see-through in the PNG. Choose White, Black or Custom under Background for a solid backdrop.

Why is part of my SVG missing?

It probably links to an image file or uses foreignObject. Linked files are reported in a notice. Embed them as data URIs in the SVG itself and try again.

What to use next

Learn more

Last reviewed . Read our editorial policy.