Sign up free
All articles

Engineering·8 min read

Vectali vs. VTracer and Potrace: SVG paths, bytes and tokens

Compare path counts, raw SVG bytes and LLM tokens across three tracers using the same eight logo PNGs. Download the files and rerun the test.

A visual note from the Vectali journal.
In this article

If you need to put a traced logo into an editor or send its SVG to a language model, check the artwork and the markup separately. On eight saved logo PNGs, Vectali produced fewer o200k_base tokens than VTracer on five. VTracer led on GitHub, Chrome and historical Firefox. Potrace produced the smallest SVG on every input, but its fixed monochrome mask erased React entirely and removed colors or shapes from the multicolor logos.

We make Vectali and selected these inputs from our regression suite. The Vectali files are frozen Automatic outputs. We ran VTracer and Potrace locally on the paired inputs on December 3, 2026. You can download the eight PNGs, Potrace masks and 24 SVGs with the runner and source notices or read the machine-readable results.

What did the tracers receive?

Vectali Automatic and VTracer worked from the same original PNG bytes for each logo. Potrace received a black-and-white mask derived from that exact PNG at its original dimensions. We used one threshold across every input, which gives a useful baseline for dark single-color artwork and exposes what can disappear when color tracing starts with a grayscale mask.

The set spans the Adidas wordmark, GitHub’s small tail cutouts, React’s thin cyan rings, Slack’s separated marks, Python’s shaded fills, VS Code’s folds, Chrome’s color wedges and a detailed historical Firefox mark. They are specific archived editions. These fixtures were available during Vectali development, so the results tell you how these files behave and cannot establish how the tracers rank on unfamiliar artwork.

Tracer Settings and source
Vectali Automatic Committed expected/*-auto.svg files paired to their PNGs by the regression manifest. The report records both hashes and the manifest’s baseline revision and binary hash.
VTracer 0.6.15 Python binding, colormode="color", hierarchical="stacked", mode="spline". Other parameters use the binding defaults. See the VTracer source and settings.
Potrace 1.16 Pillow composites RGBA onto white, converts to grayscale L, and sets pixels below 128 to black and the rest to white. potrace --svg --output potrace.svg potrace-input.pgm uses the default tracing settings and black foreground. See Potrace’s documentation.

We verified the PNG and Vectali SVG SHA-256 hashes against the same manifest entry before tracing. The original vector masters were used to establish the corpus, where available. Neither of the new runs received a vector master. We left each SVG’s original formatting, metadata, comments and coordinate precision intact. No per-logo tuning or post-trace optimization entered the measurements.

Which tracer writes fewer SVG paths and bytes?

Among the two color tracers, VTracer wrote fewer <path> elements on five of the eight PNGs, while Vectali wrote fewer bytes on five. Adidas shows how these measures can disagree. VTracer wrote seven paths and 11,207 bytes for that logo. Vectali wrote nine paths and 5,617 bytes from the same input.

Each engine cell below reads <path> elements / all shape elements / raw UTF-8 bytes. Shape totals include SVG paths, circles, ellipses, lines, polygons, polylines and rectangles, including elements in definitions. Firefox’s Vectali SVG contains five rectangles in addition to its 192 path elements. The other exports have equal path and shape totals.

PNG input Vectali VTracer Potrace
Adidas, 128 × 88 9 / 9 / 5,617 7 / 7 / 11,207 9 / 9 / 2,232
GitHub, 128 × 128 8 / 8 / 5,121 1 / 1 / 4,200 4 / 4 / 1,539
React, 128 × 128 2 / 2 / 5,458 2 / 2 / 9,731 0 / 0 / 521
Slack, 512 × 512 8 / 8 / 5,334 8 / 8 / 19,452 2 / 2 / 1,036
Python, 128 × 128 2 / 2 / 4,309 13 / 13 / 11,423 1 / 1 / 921
VS Code, 128 × 128 7 / 7 / 5,941 4 / 4 / 14,112 1 / 1 / 1,025
Chrome, 128 × 128 9 / 9 / 9,452 8 / 8 / 8,896 3 / 3 / 1,389
Firefox, 128 × 128 192 / 197 / 169,079 113 / 113 / 76,781 11 / 11 / 2,964

A path element can contain multiple subpaths. It can describe a whole silhouette with holes, or a long series of curve commands with many coordinate pairs. VTracer’s one GitHub path is a compact example. Slack makes the opposite point: both color outputs contain eight paths, but their d attributes and the rest of the markup take up different amounts of space.

The table counts literal SVG elements for all three tracers. The JSON also includes the regression manifest’s engine-level Vectali path count, which can differ from the element count in the saved file.

How many tokens does the SVG use in a model prompt?

Historical Firefox was the largest SVG from both color tracers in this sample. Its Vectali source measured 79,213 o200k_base tokens, compared with 36,994 for VTracer. Chrome shows why the tokenizer matters: VTracer used fewer bytes and fewer o200k_base tokens, while Vectali used three fewer cl100k_base tokens on that same pair of SVGs.

Each cell reads o200k_base / cl100k_base, measured with tiktoken 0.14.0. We decoded the full SVG as UTF-8 and called encode_ordinary on the complete text. These counts describe the raw source alone. A fenced code block, surrounding prompt, model-specific message wrapper or encoded attachment would have a different cost.

PNG input Vectali VTracer Potrace
Adidas 2,704 / 2,698 5,293 / 5,286 1,182 / 1,167
GitHub 2,445 / 2,436 1,976 / 1,975 787 / 777
React 2,688 / 2,698 4,560 / 4,558 191 / 185
Slack 2,429 / 2,420 8,440 / 8,432 455 / 447
Python 1,881 / 1,848 5,357 / 5,344 421 / 414
VS Code 2,674 / 2,633 6,359 / 6,355 462 / 455
Chrome 4,076 / 3,987 3,998 / 3,990 692 / 683
Firefox 79,213 / 78,528 36,994 / 36,885 1,623 / 1,606

If the model only needs to reference an SVG, save the file and pass its location when your tooling supports that. If it has to edit the markup, measure the exact text you will send. Here is a check you can run after unzipping the files and installing tiktoken==0.14.0:

from pathlib import Path
import tiktoken

raw = Path("firefox/vectali.svg").read_bytes()
svg = raw.decode("utf-8")
print("bytes", len(raw))
for name in ("o200k_base", "cl100k_base"):
    print(name, len(tiktoken.get_encoding(name).encode_ordinary(svg)))

What do you lose when the SVG gets smaller?

Potrace’s Adidas result preserves the recognizable black wordmark and costs 1,182 o200k_base tokens, so it is a useful option for a monochrome handoff. On React, the same threshold produces zero foreground pixels and an empty drawing. On Python, Vectali preserves the colored gradients but loses the faint shadow, which VTracer keeps as a faceted gray patch.

Adidas PNG and traces. Potrace preserves the black lettering and rounds some bar tips. VTracer rounds the tips on the left.

React PNG and traces. Both color outputs retain the cyan rings and dot. The Potrace panel is empty.

The React PNG has enough contrast to see its rings against the preview background, but the mask asks a different question: does any pixel become darker than the cutoff after compositing onto white? On this input the answer is no. To use Potrace for a light single-color logo, derive a silhouette from appropriate foreground information, such as a trustworthy alpha channel, and review it first. That would be a different benchmark run. Slack gives a related failure case: its fixed mask retains only the two dark magenta marks as black geometry.

Python PNG and traces. Vectali keeps shading in the snakes, VTracer keeps the shadow, and Potrace keeps one black snake.

VTracer’s stacked mode emits filled spline paths. Their paint order can hide parts of a lower layer. In a copy of the SVG, hide an upper path in your editor’s layer panel to inspect the geometry underneath. In the Python trace the blue and yellow bodies are flatter than the PNG, and separate gray patches make up the visible shadow. Vectali uses gradient definitions for the two bodies instead. Compare the output that carries the detail you need, such as a smooth yellow fill or a visible shadow underneath.

Historical Firefox PNG and traces. Both color traces show patches in the fur and globe. Potrace retains disconnected dark regions.

VTracer is the smaller color file by both token measures on historical Firefox. Vectali holds smoother shading in parts of the globe and fox, but both render patchy areas and alter fine contours. GitHub is a different tradeoff: VTracer saves markup and keeps the silhouette, while Vectali preserves some of the tiny tail dots that disappear or merge in the smaller trace. Zoom the tail before choosing based on the table.

The strips show the original PNG and actual exports in Chrome at matched panel sizes. Open each strip for a larger view or open the SVGs themselves over both light and dark backgrounds. SVG size and element counts measure the document. Fidelity and editability depend on which visible shapes, colors and boundaries survived.

How can you reproduce the benchmark?

Unzip the benchmark bundle and run its script with uv, Python 3.13 and Potrace 1.16. The script verifies the paired PNG and Vectali SVG hashes, runs VTracer and Potrace, and saves the untouched traced SVGs and a metrics report in a new directory. The report includes both tokenizer counts and lets you verify every table entry.

uv run --no-project --python 3.13 scripts/seo/vtracer-potrace-benchmark.py /tmp/svg-tracer-benchmark --potrace /opt/homebrew/bin/potrace

On systems where Potrace 1.16 is already on PATH, you can omit the last two arguments. The script pins the Python packages. Its report includes fixture provenance and each output’s SHA-256 so you can compare files directly. The broader Vectali image benchmarks cover renderings and input variation. Our Vectorizer.AI comparison examines matched previews and their visual differences. It uses preview evidence for Vectorizer.AI, so it supplies no raw SVG token comparison.

For your own logo, inspect the render before optimizing its markup or sending it to a model. For monochrome art, evaluate the mask before you trace it and check the smallest opening after. For a multicolor asset, check the important fills and edges at the target size. If the geometry is already good and markup is the problem, compress the SVG and recount the tokens. If the main problem is excess curve segments, simplify the paths and compare the edges again. Both tools run in the browser without an account.

You can preview your own logo in the browser to see which details survive. If your application needs to make that conversion repeatedly, use the image-to-SVG API and keep the result as a file the model can reference. Save the original, too. When your trace loses a critical opening, fold or outline, the original is what lets you attempt a repair without starting from the damaged vector.