Open-source project
tomayac/SVGcode avatar
tomayac/SVGcode

SVGcode: a PWA that turns raster images into SVG

Convert color bitmap images to color SVG vector images.

1,096 stars161 forksJavaScriptGPL-2.0

At a glance

What is it?
SVGcode is a Progressive Web App that vectorises JPG, PNG, GIF, WebP and AVIF images in the browser, using a WebAssembly build of Potrace and optimising the result with SVGO, with no account and no upload to a server. It suits a designer who wants a quick vector trace without installing anything, and the whole conversion happens locally.
Who is it for?
Adopt SVGcode if you need a quick vector trace of a raster image and want it to happen in the browser without an account or an upload. Skip it if you need a production vectoriser, since this is a Potrace-based PWA rather than a tracing suite, and expect the output to need manual cleanup.
Can I use it commercially?
Yes, with conditions. GPL-2.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 38 days ago.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What the app does, and where it runs

SVGcode is a Progressive Web App that converts raster images like JPG, PNG, GIF, WebP and AVIF into vector graphics in SVG format. It is available as a web app at svgco.de and can be installed from the Microsoft Store on Windows, with a Play Store listing for Android that is present in the README but commented out. The technical point is stated plainly: the app uses the File System Access API, the Async Clipboard API, the File Handling API and Window Controls Overlay customization, and the tracing itself happens in the browser. The primary language is JavaScript, the licence is GPL-2.0, the homepage is svgco.de, the last push was on 2026-09-15, and the repository has no GitHub releases, so the deployed app is the artefact rather than a tagged version.

Potrace in WebAssembly, and why the licence follows

The acknowledgements explain the whole engine in two sentences. The author stands on the shoulders of Potrace by Peter Selinger, a command line tool, which he converted to WebAssembly as the esm-potrace-wasm package so it can be used in a web app, and the converted SVGs are automatically optimised via the svgo library. Both of those facts have consequences. The WebAssembly build is what makes the app work offline and keeps the image on the machine, and the two dependencies are pinned in the manifest with esm-potrace-wasm at 0.2.1 and svgo at ^4.1.0. The licence is the other consequence, and the README is explicit that the GPL-2.0 applies because Potrace chose the GNU General Public License v2.0. So a tool that does its tracing in the browser still inherits the copyleft terms of the tracer underneath it.

The browser APIs, and why they are the interesting part

The four APIs in the opening paragraph are what separate this from a web page that uploads your file to a server. The File System Access API is what lets the app read an image from disk and write the SVG back to disk, so the file never leaves the machine. The Async Clipboard API is how the output reaches the clipboard. The File Handling API is what makes the installed app open a file when you double-click it in the file manager, which is the behaviour that makes an installed PWA feel like a desktop tool rather than a bookmark. The Window Controls Overlay customization is the piece that makes the installed app on Windows use the title bar area of the operating system, so the interface does not have a second, redundant frame. The dependency list supports the reading, with browser-fs-access as the file system wrapper, idb-keyval for stored state, module-workers-polyfill for running the WebAssembly work off the main thread, pinch-zoom-element for zooming the preview, and browserlist for the CSS targets.

The alternatives, and the bar they set

The README lists alternatives under explicit criteria, and the criteria are a useful description of what this project is trying to be. Projects listed there must be web-based, free to use with the option to save the SVG, open source, and must not require the user to log in. The two listed are VTracer, with its source on GitHub, and Image to SVG by Simon Willison, which is based on imagetracerjs. The no-login requirement is the sharp one, since it is what the File System Access API buys, and it is also what makes the difference from a server-side converter where your image is uploaded to somebody else's machine. The fact that the two alternatives are named with their source and their base library suggests the author considers the tracing approach the differentiator rather than the interface.

Running it locally

The development instructions are a plain npm workflow. You fork the repository, clone your fork, navigate into the application directory, install the dependencies, start the application, and open the application in your browser at http://localhost:3000. In command form:

bash
git clone [email protected]:<your-github-account>/SVGcode.git
cd SVGcode
npm i
npm start

Vite automatically reloads the app upon changes, and the manifest confirms the dev server is Vite, with `dev` running `vite` and `start` aliasing it. Before opening a pull request you lint with `npm run lint` and make sure the changes respect the code style with `npm run fix`. The lint script is three checks in sequence, ESLint over the JavaScript, Stylelint over the CSS, and a check for unused exports with find-unused-exports, which is a stricter rule than most projects apply.

The build, the deployment script and the packaging

The build script is more than a Vite build, because the output is a GitHub Pages site. `build` runs the Vite build, writes `svgco.de` into `docs/CNAME` and touches `docs/.nojekyll`, and stages the docs directory. The `prepare` script runs the icon generation and then the build, and the `deploy` script chains the fix, lint and build steps before committing and pushing, which is a simple continuous deployment to the Pages branch with no separate CI. There is a `start-with-sw` script for serving the built app with a service worker, a `https-localhost` dev dependency for testing the secure-context-only APIs, and an `oculus` script that packages the app as an Android APK with ovr-platform-util. The repository root shows the rest of the shape, with `src/` holding the application and the `src/i18n/` directory holding the translation files, `docs/` for the built site, `scripts/` for the icon generation, and `public/` for the static assets.

Editorial conclusion

Adopt SVGcode if you need a quick vector trace of a raster image and want it to happen in the browser without an account or an upload. Skip it if you need a production vectoriser, since this is a Potrace-based PWA rather than a tracing suite, and expect the output to need manual cleanup. Before you depend on the result, note that the tracing is Potrace and the optimisation is SVGO, and that the project is GPL-2.0, so the licence of the tool follows Potrace.

Frequently asked questions

What does SVGcode convert and how?

It converts raster images like JPG, PNG, GIF, WebP and AVIF into SVG in the browser, using a WebAssembly build of Potrace by Peter Selinger, and the converted SVGs are automatically optimised with the svgo library.

Do I need an account to use SVGcode?

No. The alternatives section states the criteria for a listed project, and they must be web-based, free to use with the option to save the SVG, open source, and must not require the user to log in. The conversion runs locally through the File System Access API.

How do I run SVGcode locally?

Clone the repository, run `npm i`, then `npm start`, and open http://localhost:3000. Vite reloads on changes, and before a pull request you run `npm run lint` and `npm run fix`.

Why is SVGcode licensed under the GPL?

Because Potrace, the tracing tool it is built on, chose the GNU General Public License v2.0. The README states the GPL-2.0 licence is due to that choice.

Official sources

  1. Issues
  2. License: GPL-2.0
  3. Project website
  4. README
  5. tomayac/SVGcode on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/tomayac-svgcode.svg)](https://hysenlabs.com/projects/tomayac-svgcode)

Was this useful?