PNG to SVG Converter

Convert a PNG image to an SVG file in your browser.

or drop files here

PN

PNG Format

Portable Network Graphics

A lossless raster image format, standardized as ISO/IEC 15948 and a W3C Recommendation.

  • Lossless compression
  • Alpha transparency
  • Screenshots and interface graphics
  • Supported by every browser
SV

SVG Format

Scalable Vector Graphics

An XML-based vector image format and W3C standard. Shapes, paths and text are described mathematically, so images scale to any size.

  • Resolution independent
  • XML text
  • Styleable with CSS
  • Logos, icons and diagrams

How to convert PNG to SVG

Follow these steps to convert PNG to SVG online.

    1

    Choose your PNG file, or several at once.

    2

    Wait while the converter turns each file into SVG.

    3

    Download each new SVG file. Your original file isn't changed.

What to know before converting PNG to SVG

  • A PNG is made of pixels; an SVG describes shapes, paths and text.
  • The PNG is embedded in the SVG, not traced, so the SVG doesn't scale like a vector.
  • Nothing is resized or reduced, and transparency is kept in the embedded PNG.
  • The result is checked to be an SVG before you can download it.
  • Each PNG gives its own SVG file, and your original PNG is not changed.
  • Your browser does the conversion, so the image isn't uploaded.

About PNG to SVG

What is a PNG file?

PNG, for Portable Network Graphics, was started as a way to replace GIF without its patent problems. The W3C published it as its first Recommendation for a format, in October 1996; RFC 2083 and ISO/IEC 15948:2004 came later. Compression is always lossless and uses DEFLATE, which is built from LZ77 and Huffman coding.

A PNG starts with a signature that never changes, then chunks: IHDR is the header, IDAT carries the pixels and IEND closes the file. A PNG may hold indexed, grayscale or truecolor images, from 1 to 16 bits per sample, and can add an alpha channel so each pixel has its own transparency. All major browsers show PNG, and macOS uses it for screenshots by default.

A PNG is a grid of pixels, and that is its limit when you want an SVG: a vector file describes shapes and stays sharp at any size. SVG is an open W3C standard, an XML language for describing two-dimensional graphics through shapes, text and embedded images. Those embedded images are the heart of PNG to SVG.

Programs that open PNG files

Linux, Windows and Mac

  • Inkscape: brings in a bitmap through File > Import and can trace it.
  • GIMP: opens PNG for editing.
  • ImageMagick: reads PNG files from the command line.

Windows

  • Windows Photos: shows PNG pictures.

Mac

  • Preview: shows PNG pictures.

Web

  • Firefox: renders PNG in the browser.

Web and Mobile

  • Chrome: renders PNG in the browser.

Mobile

  • Safari: renders PNG in the browser.

PNG and SVG compared

  • Media types: image/png for PNG, and image/svg+xml for SVG. A gzip-compressed SVG uses the .svgz extension.
  • What is stored: PNG stores pixels. SVG stores shapes, text and embedded images as instructions in XML text.
  • Scaling: an SVG's shapes redraw cleanly at any size, but a pixel image embedded in it keeps its own resolution however far it is enlarged.
  • Editing: being plain text, an SVG opens in any text editor, and its contents can be searched, indexed and compressed. They work with CSS and JavaScript, so they can be styled, scripted and animated.
  • Transparency: PNG has an optional alpha channel. SVG draws only what the file describes.
  • Effects: clipping paths, masks and filter effects are part of SVG.
  • Browsers: every major browser displays both.

What this page makes is an SVG that embeds your picture. It does not trace it. The file holds one image element, set to your picture's own pixel width and height, whose data is the picture as a PNG stored as base64 text. Nothing is resized or reduced to fewer colors, and transparency is kept in the embedded PNG. The result is still pixels inside, so it doesn't scale like a vector. If you start from a JPG, the JPG to SVG converter is the one to use.

Tracing works the other way. A tracing program looks for edges and areas of color and redraws them as shapes. The result is a redrawing rather than a copy, and it works best on dark shapes against a bright background.

Other ways to convert PNG to SVG

  • Inkscape (Windows, Mac, Linux): use File > Import to bring in the PNG, select it with the Selector tool, then open Path > Trace Bitmap (Shift+Alt+B). Pick a mode such as Brightness cutoff, which creates a silhouette-like path that follows the shape of your image. Use Update to refresh the preview and click Ok. Tracing works well for dark silhouettes on a bright background; Centerline tracing turns a shape into an open path, a fit for handwriting and line drawings.
  • Potrace (command line): Potrace reads PNM (PBM, PGM, PPM) and BMP but not PNG. Save a BMP copy of the PNG, then run potrace -s input.bmp -o output.svg. It traces in black and white at a cutoff set with -k, which is 0.5 by default. The PNG to BMP converter can make the BMP.

Problems with PNG files

  • The SVG still looks blurry when enlarged: it holds the original pixels. Trace the PNG if you need clean edges at a larger size.
  • Potrace won't read the file: it doesn't take PNG. Convert to BMP first.
  • A trace looks wrong: a trace is a redrawing, so it can differ from the original. Try a different mode in the Trace Bitmap dialog.
  • The SVG file is larger or smaller than the PNG: it is not a byte copy of your file. The embedded picture is re-encoded and written out as text inside the SVG.
  • "Image decode failed.": the browser couldn't read the PNG. Save a fresh copy from its source.

Frequently Asked Questions

Everything you need to know about our converter

Where can I convert PNG to SVG?

How do I convert a PNG to SVG?

Does this converter trace or vectorize my PNG?

How do I change a PNG into a real vector SVG?

Will the SVG scale without getting blurry?

Why is the SVG a different size from my PNG?

Is the transparent background kept?

Can I edit the SVG in Inkscape?

Can I convert more than one PNG at a time?

Is the PNG's metadata kept in the SVG?