Deterministic vector tracing, without the toolchain.

Kurviq turns PNGs and JPEGs into SVG using a fast WebAssembly engine. It has zero runtime dependencies and produces byte-identical output for the same input, options, version, and platform.

A pixelated ink shape resolving into a bird built from smooth curves and control handles
One command
npx kurviq --input in.png --output out.svg
Runtime deps
0
Engine
Wasm
Node.js
18+

A predictable part of your build.

The tracer is designed for repeatable pipelines, not a manual export dialog.

01

Byte-stable

Repeated runs are byte-identical when the input bytes, options, Kurviq version, and platform are unchanged. Cache and review generated assets with confidence.

02

Self-contained Wasm

The vector engine ships with the package. There is no separate native executable to install and no runtime dependency tree to pull into production.

03

CLI and Node API

Use the command line in asset scripts, or call the synchronous CommonJS API with a Buffer or Uint8Array. The same options apply in both surfaces.

Recipes for the pixels that usually break tracing.

Start with defaults, then add one deliberate correction for the source you actually have.

--upscale 2

Upscale before tracing

Use --upscale 2 for small labels and fine edges. Kurviq expands the working pixels while preserving the original SVG display size.

--remove-background auto

Remove real backgrounds

Border-connected removal handles uniform cells and attached neutral shadows, with channel protection for narrow gaps and near-white artwork.

--alpha-mode auto

Handle soft alpha

Auto mode detects meaningful partial transparency, resizes alpha-aware, and thresholds the result without letting hidden RGB bleed into the trace.

--sharpen

Sharpen flat artwork

Recover a compact palette from blurry icons before vectorization. The bare flag uses at most 12 colors and stays deterministic.

--mode spline

Fit smooth splines

A tested spline recipe keeps rounded icon contours smooth without over-segmenting every anti-aliased edge.

--gradient_step 8

Preserve gradients

Smaller gradient steps and full color precision retain soft shading when visual fidelity matters more than the smallest possible SVG.

Drag across raster and SVG.

These are real Kurviq traces, including small icons and a full infographic. File sizes are the source files shown.

Illustrations traced by Kurviq itself.

See all seven examples →
Doctor — soft-shaded 3D icon, raster input Doctor — soft-shaded 3D icon, traced SVG output SVG Raster
Raster: 21.1 KB SVG: 102.9 KB

Doctor — soft-shaded 3D icon

Fine facial details, soft shadows, and rounded color transitions.

Barcode — small outline icon, raster input Barcode — small outline icon, traced SVG output SVG Raster
Raster: 11.7 KB SVG: 8.3 KB

Barcode — small outline icon

Narrow bars and soft-alpha edges on a compact source.

Choice path — full illustration, raster input Choice path — full illustration, traced SVG output SVG Raster
Raster: 1.23 MB SVG: 131.8 KB

Choice path — full illustration

A 1,448 × 1,086 illustration with small labels and broad flat regions.

The traced SVG is 131 KB at DSSIM 0.003 (lower is closer).

One package. Two entry points.

Install from npm, run the CLI immediately, or convert bytes and files from CommonJS.

CLI

Terminal
npm i kurviq
npx kurviq --input in.png --output out.svg

Node API

JavaScript
const fs = require('node:fs');
const { convert, convertFile } = require('kurviq');

const svg = convert(fs.readFileSync('in.png'), {
  mode: 'spline',
  upscale: 2,
  alphaMode: 'auto',
});

convertFile('in.png', 'out.svg', { preset: 'poster' });
Know the limits: conversion is synchronous, single-threaded, and CPU-bound. Kurviq traces pixels; it does not perform OCR or preserve selectable text. The current package targets Node.js and does not include a browser build.