Image to SVG Converter (PNG / JPG to Vector)
NEW!

Image to SVG Converter (PNG / JPG to Vector)

Convert PNG, JPG, WebP or GIF to a clean SVG in your browser: colour quantization, smooth Bézier tracing, transparent background, PNG export. No upload.

Photo to Art

Upload an image

Drag an image here, paste it, or click to select

PNG, JPG, WebP or GIF — everything is processed in your browser

Or try an example:

All processing happens locally in your browser. Your image never leaves your device.

Keywords

png to svgconvert image to svgjpg to svgvectorize image onlineimage vectorizerraster to vectorsvg converter freelogo to vector

Need something else?

How to use

1

Upload, drag in or paste a PNG, JPG, WebP or GIF — or pick one of the built-in examples (flat logo, two-colour icon, eight-colour shapes, black-and-white line drawing). The image is decoded locally and never leaves your device.

2

Choose a mode: Color for logos and illustrations, Grayscale for shaded artwork, or Black & white for scanned line drawings, stamps and signatures. Set the number of colours (Auto picks a sensible count for you) and, in black-and-white mode, move the threshold slider until the strokes look right.

3

Tune the smoothing slider to trade faithful pixel edges for softer curves, and raise the minimum region size to drop specks, JPEG noise and anti-aliasing fringes that would otherwise turn into hundreds of tiny paths.

4

Turn on transparent background if your logo or icon sits on a flat colour you do not want in the SVG; the tool drops the colour that dominates the image border. Drag the compare handle across the preview to check the result against the original, and read the stats: colours used, number of paths and SVG size.

5

Download the SVG, or export a PNG rendered from the vector at an exact pixel width (512–4096 px) or at a paper size and DPI. Open the SVG in Inkscape, Illustrator, Figma or your cutting-machine software to keep editing.

Features

Colour, grayscale and black-and-white modes

Colour mode clusters the image into 2–32 flat colours (or an automatic count) in the perceptual CIELAB space; grayscale snaps every pixel to a uniform grey ramp; black-and-white applies a luminance threshold you control with a slider, which is exactly what a scanned pen drawing or a signature needs.

Smooth, gap-free vector paths

Region boundaries are traced on the pixel grid, simplified with Douglas–Peucker and rounded into quadratic Bézier curves where the outline is soft while genuine corners stay sharp. Because a border shared by two colours is simplified once and reused on both sides, neighbouring fills never open hairline gaps.

Noise control that keeps files small

The minimum region size slider merges specks below a chosen pixel area into a neighbouring region, and adjacent colours closer than a small ΔE are collapsed before tracing. The result is an SVG with a handful of meaningful paths instead of thousands of one-pixel fragments, and the stats panel tells you the count and the size in KB.

Transparent background in one click

Turn on the toggle and the tool detects the colour that covers most of the image border — the white or flat backdrop behind a logo — and leaves it out of the SVG, so the vector drops straight onto any coloured page, slide or fabric without a box around it.

SVG and print-ready PNG export

Download the SVG itself, or rasterise it back to a PNG at an exact width or at A4, A3, A5, Letter or Legal size from 96 to 600 DPI. The export size is clamped to a memory-safe ceiling so a large request never produces a blank file on a phone.

Why Choose This Tool?

100% private — your image never leaves the browser

Most online vectorisers upload your file to a server, process it there and keep a copy for an unknown time. This converter decodes the image with standard web APIs, runs the whole pipeline — colour quantization, region cleanup, boundary tracing and SVG emission — on your own device, and hands you the result as a download. A client logo you have not been cleared to share, a scan of a signature, or an unreleased icon set stays on your computer. It also works offline once the page has loaded.

Real region tracing, honestly described

The tool does not run an edge filter or an AI model that guesses shapes. It reduces the image to flat colours, finds the connected region of each colour, walks the shared boundaries on the pixel lattice, simplifies each arc exactly once and turns it into a filled path with holes handled by the even-odd fill rule. Every step is deterministic, so the same image with the same settings produces byte-identical SVG every time.

Controls that map to real parameters

Smoothing is the Douglas–Peucker tolerance in pixels; minimum region size is a pixel area; the black-and-white threshold is a luminance cut-off from 0 to 255; the colour count is the number of k-means clusters. Nothing is a mystery preset, so once you understand what each slider does you can predict what it will do to the next logo.

Made for logos, icons and cut files

Flat colours, grouped fills, largest regions first, no inline styles and an optional transparent background: the SVG is laid out the way a vector editor or a cutting-machine program expects it. Combine it with our related photo-art tools when you need a coloring page, a paint-by-numbers chart or pixel art from the same source picture.

Raster vs Vector, and How This Tool Traces Your Image

Raster and vector are two different ways to describe a picture

A PNG, JPG, WebP or GIF is a raster: a grid of coloured pixels with a fixed width and height. Enlarge it and the pixels grow into visible squares or blur into mush; there is no information beyond the grid. An SVG is a vector: a text document that describes shapes — paths, curves, fills — in coordinates. A renderer redraws those shapes at whatever size you ask for, so a vector logo prints razor-sharp on a business card and on a shop front, and its file size depends on how many shapes it contains rather than on how big it is drawn. Converting a raster into a vector means inferring shapes that were never stored, which is why the process is called tracing rather than converting, and why the source image matters so much.

The pipeline this converter actually runs

Everything below happens in your browser after the image is decoded and, if needed, downsampled so its longer side is at most 1,024 pixels. The SVG keeps your original pixel dimensions as its width and height, so the file drops into a layout at the same size as the source.

  • 1. Flatten transparency. Pixels of a transparent PNG are composited onto white; fully transparent pixels become pure white. This gives a logo on a transparent background one clean, droppable backdrop colour instead of a smear of half-blended fringe.
  • 2. Reduce to a palette. In Color mode, k-means clustering with k-means++ seeding groups the pixels into N clusters in the CIELAB colour space, so "similar" means similar to the eye rather than similar in raw RGB numbers. The random generator is seeded, which is why the result is deterministic. With "Auto" selected the tool tries candidate counts from 2 to 16 and picks the knee of the within-cluster variance curve — the point where adding another colour stops buying much fidelity. Grayscale mode skips clustering and snaps each pixel to the nearest step of a uniform grey ramp with N levels. Black & white mode compares each pixel's luminance with your threshold and labels it dark or light.
  • 3. Merge and clean up. In Color mode, adjacent palette entries closer than a ΔE of 4 are merged, because two fills that differ by less than the eye can tell only add paths. Then the tool finds the connected regions of every colour and merges any region smaller than the minimum region size into a neighbour — preferring a neighbour of a similar colour. This is what removes JPEG mosquito noise, dust on a scan and the one-pixel anti-aliasing fringe around letters.
  • 4. Trace the boundaries. Every unit edge of the pixel lattice where two regions differ is a boundary edge. The edges are stitched into arcs between the points where three or more regions meet, and each arc is simplified with the Douglas–Peucker algorithm exactly once, then shared verbatim by both regions it separates. That single detail is why neighbouring fills in the output are watertight: they were never simplified independently. Soft vertices are then rounded into quadratic Bézier curves while sharp corners are kept as corners. The smoothing slider maps to the Douglas–Peucker tolerance, from 0.5 px (keeps the pixel staircase almost intact) to 4 px (very smooth, small features may round off).
  • 5. Emit the SVG. Each region becomes one <path> with fill-rule="evenodd", so a ring or a letter "O" is a single path with a hole. Paths are grouped by colour inside <g fill> elements, largest regions first, so the drawing order is stable and a vector editor shows one group per colour. When the background is not transparent, a rectangle in the dominant colour is painted first so anti-aliasing seams never show the page behind. Up to 5,000 paths are written; if the image would need more, the smallest regions are dropped and the stats panel says so.

What the controls really change

  • Colours sets the number of k-means clusters (or grey levels). Fewer colours mean fewer regions, fewer paths, smaller files and a more poster-like look. A three-colour logo traced with 16 colours does not become more faithful — it grows anti-aliasing colours you did not want. Start with Auto, then go down, not up.
  • Smoothing is a distance in pixels. Low values are right for pixel art or when the source is already crisp; high values are right for scanned drawings and JPEG-compressed logos where the "detail" is really noise.
  • Minimum region size is a pixel area. Raise it until specks vanish but stop before the dot on an "i" or the counter of an "e" disappears — the compare handle in the preview is there for exactly that check.
  • Threshold (black & white only) is the luminance cut-off from 0 to 255. Lower it to thicken faint pencil lines; raise it to drop paper texture and shadows.
  • Transparent background drops the palette colour that dominates the image border, but only when that colour covers at least 30 % of the border. A logo boxed in white on a busy backdrop will not be detected — crop first.

When tracing works, and when it does not

Region tracing rewards images that were vectors once, or were drawn as flat shapes: logos, icons, pictograms, flat illustrations, stickers, stamps, silhouettes and scanned line drawings. It also handles chunky pixel art and screenshots of simple diagrams well. It is candidly the wrong tool for photographs, soft gradients, drop shadows, glows and small text. A photograph traced with eight colours becomes a posterised, flat-colour poster — sometimes attractive, never a photo. A gradient becomes visible bands. Text below roughly 20 px on the working raster loses its counters and becomes blobs; if the words matter, retype them in the vector editor over the traced shapes.

Automatic tracing vs the alternatives

AspectThis tool (browser)Manual redraw in a vector editorDesktop auto-trace feature
PrivacyImage never leaves the deviceLocalLocal (some cloud tracers upload)
TimeSecondsMinutes to hoursSeconds to minutes
Fidelity to the sourceFollows the pixels; artefacts are traced tooAs good as the artistFollows the pixels, more presets
Clean geometry (true circles, exact strokes)No — approximated curvesYesNo — approximated curves
Colour control2–32 colours or Auto, three modesUnlimitedVaries by product
Software neededA browserVector editor and skillInstalled desktop application
Best forLogos, icons, flat art, scans, cut filesBrand-critical logos, typeBatch work inside an existing workflow

When NOT to use this tool

  • You need a mathematically clean logo for a brand guideline — trace it here to get a base, then redraw the key shapes over it.
  • The image is a photograph and you want it to still look like a photograph. Use an image compressor or format converter instead.
  • The subject depends on gradients, shadows or transparency effects; flat fills cannot represent them.
  • The important content is small text; retype it in a vector editor with the real typeface.
  • You already have the original vector file (AI, EPS, PDF, SVG). Converting a raster export back is always worse than the source.

SVG for cutting machines and embroidery

Vinyl cutters, plotters and craft cutting machines follow the outlines of filled paths, so a good cut file has few colours, closed shapes and no background rectangle. Choose Black & white or two to four colours, raise the minimum region size so no speck becomes a tiny cut, turn on transparent background so the sheet outline is not traced, and check the path count — each path is a shape the machine will cut. Because each colour is grouped in its own <g>, most cutting programs treat a colour as one layer, which maps neatly to one sheet of vinyl per colour.

Related photo-art tools

The same region engine powers our coloring page generator, which keeps only the outlines, the paint-by-numbers generator, which numbers each region against a palette, and the pixel art generator, which quantises to a coarse grid instead of tracing. Use whichever output your project needs — the pixel data never leaves your browser in any of them.

Frequently Asked Questions

How does the converter turn a PNG or JPG into SVG?

It flattens transparency onto white, reduces the image to a small palette (k-means clustering in CIELAB, a grey ramp, or a luminance threshold), merges near-identical colours and specks below the minimum region size, traces every region boundary on the pixel grid, simplifies each shared border once with Douglas–Peucker, rounds soft vertices into quadratic Bézier curves and writes one filled path per region, grouped by colour.

Is my image uploaded to a server?

No. The file is decoded and traced entirely in your browser with standard web APIs, and the SVG or PNG you download is generated on your device. Nothing is transmitted, and the tool keeps working offline once the page has loaded.

Will my photo look good as an SVG?

Honestly, no — not as a photo. Vectorising a photograph produces posterised flat-colour art with visible bands where gradients used to be. That can be a pleasant poster effect at 8–16 colours, but the tool is designed for logos, icons, flat illustrations and scanned line drawings, and the page says so before you start.

Why is my SVG huge, and what does the path cap mean?

File size scales with the number of paths. Noisy JPEGs, photos and many colours create thousands of tiny regions. Lower the colour count, raise the minimum region size and increase smoothing. The tool writes at most 5,000 paths; when an image would need more, the smallest regions are dropped and the stats panel tells you the output was truncated.

How does the transparent background option work?

The tool counts which palette colour touches the image border the most. If that colour covers at least 30 % of the border it is left out of the SVG and no background rectangle is written. A transparent PNG works especially well because its transparent pixels are flattened to a single white that is then dropped.

What happens to text inside a logo?

Letters are traced as filled shapes with holes, not as editable text. Large, bold lettering traces well; small or thin text loses its counters and rounds off. If the words matter, keep the traced shapes as a guide and retype the text in your vector editor with the real font.

Can I edit the SVG in Inkscape, Illustrator or Figma?

Yes. The output is plain SVG 1.1 with one path per region grouped by colour, no inline styles and no scripts, so it opens in Inkscape, Illustrator, Affinity Designer, Figma and browsers. Each colour group can be selected, recoloured or deleted as a unit.

Is the SVG usable with Cricut, Silhouette and other cutting machines?

Yes, with a few settings: use Black & white or 2–4 colours, raise the minimum region size so specks do not become tiny cuts, turn on transparent background so the sheet edge is not traced, and check the path count. Import the SVG into your machine's software; each colour group maps to one layer or material.

What sizes can I export the PNG at?

You can rasterise the SVG at an exact width from 512 to 4,096 pixels, or pick a paper size — A4, A3, A5, US Letter or US Legal — at 96 to 600 DPI. Requests are clamped to a memory-safe ceiling so a very large export never produces a blank image on a phone.

Will the same image always give the same SVG?

Yes. The k-means seeding uses a fixed pseudo-random seed, the region merging is ordered, and the tracing is deterministic, so identical input and settings produce a byte-identical SVG. That makes it safe to regenerate a file later or in a build script.

Related Articles

Learn more