Rekha

Raster in.
Clean SVG out.

Rekha traces PNG and JPEG logos, icons and artwork into a few editable paths, and keeps shading as real gradients instead of cutting it into flat tiles.

Free for images up to 4 megapixels, no account needed. Open source in Go.

Rekha's own logo, enlarged, the source image Rekha's own logo, enlarged, traced to SVG by Rekha
A corner of Rekha's logo, 120 pixels across, enlarged. Drag to compare the PNG with its trace.

The same logo, three tracers

A 2048-pixel browser mark with radial shading, traced by each tool at its default settings. Fewer paths and bytes mean an SVG that is easier to edit and faster to load. PSNR measures how close the result is to the source: higher is closer.

All three logos, and how they were measured

Browser mark traced by three tools
ToolPathsFile sizePSNR
Rekha 33 32 kB 34.8 dB
Adobe Express 197 325 kB 28.7 dB
VTracer 7 30 kB 17.2 dB

What makes the SVG clean

A tracer can copy every pixel and still give you a file nobody wants to open. Rekha works out what was drawn.

7 flat paths1 path, 1 gradient

Shading stays a gradient

Bands of colour that follow one ramp are merged and filled with a single linear or radial gradient. Highlights and rim lights are layered on top as translucent gradients, the way an illustrator draws them.

r4 arcs4 lines, 4 arcs

A circle is a circle

Circles come out as four exact arcs, rounded rectangles keep one shared radius, and a sharp corner is one node. Nothing wobbles when you scale it.

edge placed inside the pixel

Edges land where they were drawn

The grey pixels along an edge record where the true edge was. Rekha optimises every curve against them, placing it to a fraction of a pixel.

SVGPDFEPSDXFone trace, the same curves in each

Four files from one trace

SVG for the web and for editing, PDF and EPS for print, DXF for cutters and CAD. All four are written from the same curves.

Everything Rekha does

Drag to see for yourself

Each of these was a 2048-pixel PNG. The figures are what the tracer reported.

Bird, layered gradients, the source image Bird, layered gradients, traced to SVG by Rekha
Bird, layered gradients 69 paths, 23 gradients, 25 kB
Letter Q, ribbon, the source image Letter Q, ribbon, traced to SVG by Rekha
Letter Q, ribbon 6 paths, 1 gradients, 6 kB
Letter V, dots, the source image Letter V, dots, traced to SVG by Rekha
Letter V, dots 17 paths, 10 gradients, 9 kB

More in the gallery

How a trace is made

The same engine does this in the studio, on the command line, inside a Go program and in the browser through WebAssembly. Same input, same SVG, every time.

  1. Reduce the colours

    The image is brought down to the few colours it was drawn in, measured in OKLab so that shades which look alike are treated alike.

  2. Find the regions

    Connected areas of one colour become shapes. Anti-aliased pixels between two colours are recognised as their mixture and absorbed.

  3. Fit the curves

    Each boundary is fitted once with cubic curves and shared by both neighbours, so adjoining shapes meet exactly.

  4. Merge the shading

    Where neighbouring bands fade into each other, they become one region with one gradient.

Use it where you work

  • In the studio. Drop an image, wipe between source and SVG, tune, download. Open the studio
  • On the command line. One static binary for Linux, macOS, Windows and FreeBSD.
  • From Go. A library with no cgo and one dependency.
  • Over HTTP. Post an image, get the SVG back.

Install and API details

Terminal
brew tap vexyl-ai/tap && brew install --cask rekha

# writes logo.svg
rekha logo.png

# try four settings, keep the closest
rekha --auto logo.png

# smooth shading as gradient fills
rekha --preset photo --gradients art.jpg

# PDF or EPS from the extension
rekha -o logo.pdf --preset poster logo.png

From the blog

All posts

Questions people ask

What does Rekha do?

It converts raster images, which are grids of pixels, into vector graphics, which are shapes. Give it a PNG, JPEG or GIF and it returns an SVG made of paths and gradients that you can scale to any size and edit in Illustrator, Figma or Inkscape.

Is it free?

Yes. The studio traces images up to 4 megapixels free, without an account. The tracer itself is open source under the AGPL-3.0, so you can run it on your own machine with no limits. Pro is for larger images and heavier use, and a commercial licence covers closed-source products.

How is it different from other image to SVG converters?

Most converters cut shading into flat bands and trace every pixel faithfully, which gives large files with hundreds of shapes. Rekha fits real gradients, recognises circles and rectangles, and places curves from the anti-aliasing. On a shaded logo in our benchmark it used a sixth of the paths and a tenth of the bytes of Adobe Express, and matched the source more closely.

What happens to my image?

The studio sends your image to the server to trace it and returns the result; the image is not kept. If it must never leave your machine, use the command-line tool or the open-source browser build, which traces entirely on your own computer.

Which images work best?

Logos, icons, flat illustration, scanned line art and artwork with smooth shading. Start from the largest clean copy you have. Photographs can be traced for a posterised look, but they rarely make useful vectors.

Trace an image now

Drop a PNG or JPEG into the studio and download the SVG. No account needed for images up to 4 megapixels.