SVG Stroke to Fill

Turn every stroke in an SVG into a filled shape, so icons scale without changing line weight, work in icon fonts and tools that ignore strokes, and look identical everywhere. Drop SVG files or paste markup, compare before and after side by side, and download the outlined SVG or a ZIP of the batch, all without uploading anything.

What is preserved

Stroke propertyResult
stroke, stroke-opacityfill, fill-opacity of the outline
stroke-widthOutline width
stroke-linecap / linejoin / miterlimitCap and join shapes
stroke-dasharray / dashoffsetSeparate dash outlines
transform, clip-path, mask, filterCopied to the outline

When to use it

  1. Prepare stroke icons (Lucide, Feather, Heroicons outline) for icon fonts.
  2. Make line art scale without the stroke getting thicker or thinner.
  3. Use icons in tools that ignore strokes, such as some embroidery and cutting software.
  4. Lock in stroke widths before handing artwork to someone else.

How to Use

  1. Drop SVG files or paste SVG markup.
  2. Check the before and after previews.
  3. Copy or download the outlined SVG, or a ZIP of all files.

Features

  1. Caps, joins and miter limit
  2. Dash patterns and offsets
  3. Strokes from CSS and inheritance
  4. Gradient strokes kept
  5. Fill and markers preserved
  6. Before/after preview
  7. Batch with ZIP
  8. Never uploaded

FAQs

Will the result look the same?

Yes. Width, caps, joins, miter limit, dashes, colour and opacity are reproduced, and the before/after preview lets you check.

Why is the file bigger?

Curves are traced as many short straight segments for accuracy. Run the result through an SVG optimiser if size matters.

What about shapes with both fill and stroke?

The fill is kept and the stroke outline is drawn on top, unless you turn off 'Keep existing fills'.

Does it handle text?

Not stroked text. Convert text to paths in your design app first.

Is my SVG uploaded?

No. Conversion runs in your browser.

Technical Details

The SVG is attached to the page invisibly, after removing scripts, event-handler attributes and foreignObject, so the browser works out each shape's stroke exactly as it would draw it. That includes strokes from CSS classes, style attributes and parent groups. Each path, rect, circle, ellipse, line, polyline and polygon is converted to path data. Curves are traced into short straight segments, kept within a ten-thousandth of the image's diagonal, and any dash pattern and offset is applied. A ribbon of the stroke width is then built along every smooth run. Corners sharper than 12° get the stroke's join (miter within the miter limit, otherwise bevel, or round), and open ends get its cap (butt, round or square). All pieces are wound the same way and drawn with the nonzero fill rule, so their overlaps merge exactly where the stroke would have been painted. The outline replaces the shape and inherits its stroke colour (including gradients), stroke opacity, opacity, transform, clip-path, mask and filter. If the shape also has a fill or markers, it's kept without its stroke and the outline is drawn on top. Stroked text and non-scaling strokes are left as they are, with a note.

Image Tools

Image Tools

  • Background Remover
  • Add Border to Image
  • Circle Crop & Rounded Corners
  • Image Filters
  • WhatsApp Image Optimizer
  • Meme Generator
  • Image Splitter
  • Image Average Color