Browser-based PNG to SVG converter built with Next.js. The app runs client-side conversion with quality presets, advanced tracing controls, similarity scoring, and batch ZIP export.
- Live Demo:
https://vectorize-lab-g25p.vercel.app/ - Website:
https://khepridev.xyz - GitHub:
https://github.com/Khepridev - YouTube:
https://www.youtube.com/@Khepridev
- Single PNG to SVG conversion in-browser
- Quality profiles:
Ultra,Balanced,Fast,Pixel Art - Advanced controls for trace fine-tuning
- Similarity score (PNG vs generated SVG pixel comparison)
- Batch conversion to ZIP
- Light/dark theme support
If you are deciding what to keep in production, use this matrix:
Quality profile-> required for most users; keeps UI simple and predictableAdvanced controls-> required only for power users; should stay optional/expert-onlyBatch convert-> required when users process many assets; optional for single-file workflows
- Next.js 16 (App Router)
- React 19 + TypeScript
- Tailwind CSS 4
imagetracerjsfor vectorization- Web Worker for similarity scoring
- Vitest + Testing Library for tests
Install dependencies and run the app:
npm install
npm run devOpen http://localhost:3000.
npm run lint
npm run test:run
npm run buildRecommended pre-release gate:
npm run lintnpm run test:runnpm run build
- Upload a PNG file.
- Select a quality profile.
- Optionally enable advanced controls.
- Review preview and similarity score.
- Download SVG.
Ultra: best visual fidelity, larger file, slowerBalanced: default production choice for most assetsFast: quickest output, reduced detailPixel Art: preserves hard edges for sprite/pixel assets
Use only when preset output is not enough. Adjust one parameter at a time:
numberofcolors: palette depth, quality vs file sizeltres/qtres: line/curve error thresholdspathomit: remove tiny paths for cleaner/smaller outputroundcoords: coordinate precisioncolorquantcycles,blurradius,blurdelta: color smoothing behavior
Batch mode is recommended when:
- You convert many files with the same settings
- You need consistent output profile across assets
Batch mode is not necessary when:
- You only process one or two files occasionally
- PNG input is validated by extension, MIME type, and PNG signature.
- Rendered SVG is sanitized before preview to reduce script/event payload risks.
- App runs conversion locally in browser; no server upload pipeline is required.
Current tests cover:
- PNG file validation
- SVG sanitization
- Dropzone file selection behavior
- Download button trigger flow
Run all tests:
npm run test:run- Similarity score is a heuristic, not a perceptual truth metric.
- Very large batches may increase memory usage depending on browser limits.
- Certain SVG decode operations can fail in workers on some browsers; fallback path is used.
app/page.tsx: main app UI and flowsapp/docs/page.tsx: in-app documentation pagelib/tracer.ts: trace configuration and conversion orchestrationlib/fileValidation.ts: strict PNG validationlib/sanitizeSvg.ts: SVG sanitizationworkers/similarity.worker.ts: background similarity scoringcomponents/*: UI components
- Validate presets with sample assets (photo, logo, pixel-art).
- Confirm single and batch conversion paths.
- Run lint/tests/build.
- Review docs after behavior changes.
