SVG Stroke to Fill Converter screenshot

SVG Stroke to Fill Converter

Turn stroked SVG shapes into filled outlines, so plotters, cutters and icon pipelines that only understand fills can use them.

Privacy First
0 Runs
Updated 2026-11-07
Runs on the tool server
No account needed
The markup is not stored
Refuses what it cannot outline

How the stroke-to-fill conversion works

An SVG can describe a line two ways: a thin path with a stroke width, or a closed shape that is filled. Plotters, cutting machines and several icon pipelines only understand the second kind. This tool reads the first kind and writes the second: every stroked line becomes the outline of that stroke, filled with the colour the stroke had.

The outline is built from the geometry, not traced from a bitmap: each segment contributes its two sides, each corner contributes a join and each open end contributes a cap, chosen from the element's own stroke-linecap, stroke-linejoin and miter limit. Curves are flattened within the tolerance you choose, so a smaller tolerance follows a curve more closely and emits more points.

How to use it

Paste the SVG markup, set the curve tolerance, and press Run. The result is an SVG you can download: strokes are gone, fills are in their place, and everything else in the document is passed through unchanged.

Why this runs on the server

The conversion is a geometry job: path parsing, curve flattening, affine transforms and stroke offsetting. Doing it on the server keeps the page responsive and gives the same output every time.

Paste SVG markup and the server converts each stroked shape into a filled outline, so a plotter, cutter or icon pipeline that understands only fills receives a shape it can use. The result is one outline.svg plus a summary of how many shapes became how many pieces.

A stroke has width, so outlining it means expanding the path by half that width on each side and joining the ends and corners according to the line cap and line join. The page follows those attributes down from the svg and g elements, with an element's own attribute winning and an inline style winning over both.

Shapes with no stroke, or with a stroke of none or transparent, are copied through. Text, use, image, foreignObject and mask elements, and paint servers referenced as url(#...), are refused with a sentence rather than dropped, because silently losing a shape is worse than refusing the file.

The two options

Curve tolerance runs from 0.05 to 5 pixels, default 0.25. A lower value follows a curve more closely and emits more points, which makes a larger file and a more faithful cut; a higher value simplifies the outline and can visibly flatten a tight bend.

Decimal places runs from 0 to 4, default 2, and rounds every emitted number with trailing zeros trimmed. Two runs with the same markup and options are byte-identical, which matters when the output goes into version control.

  • SVG source up to 1 MB
  • Curve tolerance: 0.05 to 5 px, default 0.25
  • Decimal places: 0 to 4, default 2

What is carried and what is refused

Stroke colour, width, line cap, line join, miter limit and the two opacities are inherited and applied. Transforms are baked into the geometry, so a rebuilt group no longer carries a transform and a copied subtree receives its accumulated matrix instead.

A url(#...) paint is refused because resolving a gradient into a solid outline is a different operation with no single correct answer. A text element is refused because its outline depends on font metrics the server may not have in the same version.

How to use the conversion form

Paste the SVG markup, at most 1 MB, then set the curve tolerance between 0.05 and 5 pixels and the decimal places between 0 and 4. The defaults of 0.25 and 2 suit an ordinary icon; lower the tolerance only when a tight curve visibly flattens.

Press Run and download outline.svg when it returns, checking the summary's shape-to-piece count against the file. A refusal names the unsupported element, such as a gradient stroke or a text node: remove or convert that element and run again.

What to Expect

Best for

  • Preparing a stroked icon for a cutter that fills shapes
  • Turning a line drawing into a plottable outline
  • Producing a deterministic SVG with rounded numbers

Not ideal for

  • Gradient or pattern strokes, which are refused
  • Text converted to outlines, which needs the font and a different tool
  • An SVG larger than 1 MB

What this tool keeps

  • The stroke's colour, width and join style in the filled result
  • Transforms, baked into the emitted coordinates
  • A byte-identical result for the same input and options

What may need cleanup

  • A tight curve flattened by a high tolerance
  • A refusal caused by one unsupported element in an otherwise usable file
  • The decimal precision, which trades file size against fidelity

Common errors

  • Pasting an SVG that uses a gradient stroke and reading the refusal as a parser bug
  • Choosing a large tolerance for a detailed icon and losing the detail
  • Expecting text to be outlined when the element is explicitly refused

Example use cases

  • A laser-cutter or plotter workflow
  • An icon set that must be fills only
  • A reproducible asset build for version control

Sample input

A 4 KB SVG with one stroked circle, a 2-pixel stroke and round caps, converted at 0.25 tolerance and two decimals.

Sample output

An outline.svg in which the circle is a filled ring, with a summary reporting one shape turned into one outline piece and the tolerance.

Who this is for

  • Laser-cutting hobbyists
  • Icon designers
  • Developers preparing print assets

Frequently asked questions

What does the stroke-to-fill conversion produce?

Each stroked shape becomes a filled outline, with one outline.svg and a summary of how many shapes became how many pieces.

Can it convert text to outlines?

No. That needs the font and a different tool.

Which strokes are refused?

Gradient and pattern strokes are refused, as is an SVG larger than 1 MB.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.