How to converting a whole icon set: the honest batch guide
- Step 1Decide if you need a colour move or true outlines — For an icon-font or any pipeline that needs visible filled silhouettes from line icons, you need true stroke expansion — use the Inkscape CLI route below, not this tool. Use the JAD tool only when copying stroke colour onto fill for closed shapes is genuinely what you want.
- Step 2If using the JAD tool, confirm the runner is paired — Because the tool is browser-required, server-side automation goes through the paired @jadapps/runner, which spins a local headless-browser session for tools like this. Pair the runner once from your dashboard; the web tool auto-routes Pro+ jobs to it when it is running locally.
- Step 3Loop your folder, one job per file — There is no multi-file payload for this tool (only the sprite builder accepts multiple files). Script your loop to send each
.svgas its own job and collect each<name>-filled.svg. Keep each file under the tier limit (2 GB on Developer). - Step 4For true outlines, script Inkscape instead — Run
inkscape --actions="select-all;object-stroke-to-path;export-filename:out.svg;export-do" in.svg(or your editor's equivalent) in a shell loop. This produces real filled outline geometry the JAD tool cannot, ready for an icon-font generator. - Step 5Validate every output before the font build — Whichever route, open a sample of outputs. For the JAD tool, confirm closed shapes are solid and accept that open paths are gone. For Inkscape, confirm outlines are closed filled shapes. Reject any icon that came out invisible.
- Step 6Chain optimisation across the set — Run the validated outlines through svg-pro-minifier (free, server-safe — true batch via its API) and svg-precision-tuner to shrink coordinates before generating the font. These tools DO support API batching.
Automation routes for stroke-to-fill
What each route can and cannot do at scale. 'JSON API batch' means a server-side HTTP call with no browser.
| Route | Multi-file in one call? | Produces true outlines? | Notes |
|---|---|---|---|
| JAD JSON REST API | n/a — rejected | n/a | Tool is not server-safe; API throws 'requires browser-side processing… Use the web tool' |
| JAD web tool (manual) | No (one file/paste at a time) | No (colour move only) | Drop or paste a single SVG, click Process, download <name>-filled.svg |
| @jadapps/runner (headless) | No — one job per file | No (colour move only) | Script a loop; runner runs browser-required tools locally for Pro+ users |
| Inkscape CLI loop | Yes (your shell loop) | Yes — real object-stroke-to-path | The route to use when you need filled silhouettes for an icon font |
| Illustrator scripting (ExtendScript) | Yes (your script) | Yes — Outline Stroke | Desktop only; good if your set already lives in .ai files |
Per-element behaviour at scale (JAD tool)
Applied identically to every file and every element. Predict your set's outcome from these rules.
| Input element | Outcome | Visible after? |
|---|---|---|
Closed shape, fill="none" stroke | fill = stroke colour; stroke attrs removed | Yes — solid (not an outline) |
Open path/line, fill="none" stroke | fill = stroke colour; stroke attrs removed | No — zero-area fill, invisible |
Already filled (fill="#…") | Skipped | Yes — unchanged |
Stroke via CSS class / <style> | Not detected, skipped | Yes — still stroked |
<text>, <use>, <g>, defs | Not in target list | Yes — unchanged |
Cookbook
Concrete commands and scripts. Where the JAD tool fits, and where you must reach for an editor CLI to get real outlines across a set.
The JSON API rejects this tool
Proof that there is no server-side batch endpoint. Any attempt to invoke stroke-to-fill through the server-safe API path throws. This is intentional — the tool needs a real DOM.
POST /api/v1/tools/svg-stroke-to-fill/run (hypothetical) Server response (effectively): Error: svg-stroke-to-fill is not exposed via the API — it requires browser-side processing (DOM, Canvas, or remote-font fetch). Use the web tool. Contrast: svg-pro-minifier, svg-precision-tuner, svg-path-simplifier ARE server-safe and batch via the API.
Runner loop: one headless job per icon
The supported automation route. Each file is its own job; there is no multi-file payload. Pseudocode for a folder walk that dispatches to the local runner.
for f in icons/*.svg; do
# dispatch ONE job to the paired @jadapps/runner
# (browser-required tool runs in its headless session)
jad-runner run svg-stroke-to-fill \
--in "$f" --out "out/$(basename "${f%.svg}")-filled.svg"
done
# Result: colour-only conversions. Open-path icons may be
# invisible — validate before using.Inkscape CLI: REAL outlines for the whole set
When you actually need filled silhouettes for an icon font, this is the route. Inkscape's stroke-to-path produces genuine offset geometry that the JAD tool does not.
for f in icons/*.svg; do
inkscape "$f" \
--actions="select-all;object-stroke-to-path;\
export-filename:out/$(basename "$f");export-do"
done
# out/*.svg now contain closed filled outline paths,
# safe for Icomoon / Fontello / svgtofont.Predicting set-wide visibility before you commit
A quick audit so you don't ship invisible icons. Count open vs closed stroke-only shapes; open ones will vanish under the JAD tool.
# Rough heuristic: open paths (no 'Z') with fill=none+stroke # will disappear under a colour-only conversion. grep -L 'Z"' icons/*.svg # candidates for vanishing # If many hit, use the Inkscape route instead so those # strokes become visible filled bands.
Post-outline optimisation that DOES batch
After genuine outlining, optimise across the set using server-safe JAD tools that accept the JSON API — unlike stroke-to-fill, these batch cleanly.
for f in out/*.svg; do
curl -s -X POST \
127.0.0.1:9789/v1/tools/svg-pro-minifier/run \
--data-binary @"$f" > "min/$(basename "$f")"
done
# svg-pro-minifier + svg-precision-tuner are server-safe;
# they accept this pattern, stroke-to-fill does not.Edge cases and what actually happens
No server-side JSON API for this tool
rejected (not server-safe)The tool is excluded from the server-safe set, so runSvgToolApi throws and there is no /run endpoint to POST to. Automate via the paired runner's headless browser instead, or use a vector-editor CLI for true outlines. Do not build a pipeline assuming an HTTP batch endpoint exists.
No multi-file payload
By designOnly the sprite builder accepts multiple files; stroke-to-fill processes one file (or one paste) per run. Your 'batch' is a loop you write that issues one job per icon — there is no single call that ingests a whole folder.
Open-path icons silently become invisible across the set
By designAt volume this bites hard: every open-path line icon converts to a zero-area fill and disappears. If your set is mostly line icons, a colour-only batch yields a library of invisible glyphs. Use the Inkscape route so those strokes become real filled bands, and validate a sample before the font build.
Developer-tier gate blocks Free/Pro automation
rejected (tier gate)The tool's minimum tier is Developer. Free and Pro accounts cannot open the web tool (upgrade overlay) and the runner accelerates Pro+ jobs — so practically you need a Developer plan to run this at all. Plan tiers before scripting.
Per-file size limit at scale
Schema limitEach job is checked against the tier limit: 5 MB Free, 50 MB Pro, 2 GB Developer. Large compound illustrations can exceed this; split or simplify them first. Oversized files throw a per-job limit error and are recorded as blocked.
Strokes defined in CSS won't convert in any file
Not convertedIf your icon set styles strokes through a shared <style> block or classes (common in design-system exports), the attribute-only read sees no stroke and converts nothing. Pre-process to inline strokes as attributes, or outline in an editor that resolves CSS.
Two-tone icons partially convert
PreservedIn a mixed set, elements that already have a fill are skipped while stroke-only siblings convert. The result can be visually inconsistent across the library. Decide a single representation (all filled, all outlined) and normalise before the font build.
Runner not running — falls back to browser
ExpectedIf the local runner isn't up, the web tool runs the job in-browser instead, which is fine for one file but defeats unattended batching. For true automation keep the runner alive, or move genuine outlining to the editor CLI which doesn't depend on it.
Frequently asked questions
Is there a JSON API to batch-convert strokes to fills?
No. This tool is not server-safe — it needs the browser DOM — so the JSON API rejects it with 'requires browser-side processing… Use the web tool.' Server-safe SVG tools (minifier, precision tuner, path simplifier, hex swapper, etc.) do offer API batching, but stroke-to-fill is not one of them.
Can the @jadapps/runner do it unattended?
Yes, for browser-required tools the runner uses a local headless-browser session. But each file is a separate job — there is no multi-file payload. Script a loop that dispatches one job per icon and collects each <name>-filled.svg.
Can I send a whole folder in one call?
No. Only the sprite builder accepts multiple files; stroke-to-fill takes one file or one paste per run. Batching means looping in your own script.
Will batching this prepare line icons for an icon font?
Not as you'd hope. The tool only moves stroke colour to fill; open-path line icons become invisible. Icon fonts need real filled silhouettes, which requires genuine stroke expansion — use an Inkscape or Illustrator CLI loop for that, then optimise with the JAD server-safe tools.
What's the right way to outline a whole icon set?
Use a vector editor's command line: inkscape --actions="select-all;object-stroke-to-path;export-filename:out.svg;export-do" in.svg in a shell loop, or Illustrator ExtendScript with Outline Stroke. These produce closed filled outlines the JAD tool cannot, and they handle the whole folder via your loop.
What tier and size limits apply when I do automate?
The tool's minimum tier is Developer, and the per-job size limit is 2 GB on Developer (5 MB Free / 50 MB Pro, but those tiers can't open the tool). Each looped job is checked individually against the limit.
How do I avoid shipping invisible icons?
Audit for open paths before converting — open stroke-only shapes vanish under a colour move. A rough check is to flag files whose paths don't close (Z). If many do, switch that set to the editor-outlining route, and always eyeball a sample of outputs before the font build.
Do strokes set via CSS get converted in batch?
No. The tool reads the stroke attribute only. Strokes from <style>/classes are invisible to it, so those elements are skipped across every file. Inline strokes as attributes first, or outline in an editor that resolves CSS.
Which downstream tools support real API batching?
Server-safe ones: svg-pro-minifier, svg-precision-tuner, and svg-path-simplifier (polyline paths only). Run your genuinely-outlined set through these via the JSON API to shrink files before generating the font.
Is anything uploaded when the runner processes files?
No — the runner executes locally on your machine; file content stays on your hardware. The web tool likewise processes in-browser with a 0 bytes uploaded badge. Only anonymous run counts are recorded for signed-in dashboard stats.
Why is this tool browser-only when others have an API?
It depends on DOMParser/XMLSerializer to walk and rewrite the document. The platform's server-safe subset uses string/regex transforms that run without a DOM; DOM-dependent tools (this one, the metadata scrubber, the canvas exporter, font-to-path, viewbox fixer) are kept browser/runner-only for correctness.
What output filename does each job produce?
<originalname>-filled.svg, with metrics reporting Elements converted and a Note that the geometry is approximated (colour move, not offset-path expansion). Plan your output naming around that suffix.
Privacy first
Every JAD SVG tool runs entirely in your browser using the DOM API and Canvas. Your SVG files never leave your device — verified by zero outbound network requests during processing.