Convert SVG Line to Path

Replace <line x1 y1 x2 y2> with <path d="M … L …"> — leave polylines and polygons alone

Polyline → path? Polyline → pathPolygon → path? Polygon → path

FAQ

Quick answers

How do I convert an SVG line to a path?
Click Line to path. Each <line x1 y1 x2 y2> becomes <path d="M x1 y1 L x2 y2"> with the same stroke.
Does line-to-path convert polylines as well?
No. A polyline is a chain of points — that is Convert SVG Polyline to Path. This page only rewrites the two-point <line> element.
How is line-to-path different from converting a dashed stroke to a path?
Bake dashes walks stroke-dasharray and emits one subpath per dash. Line to path keeps a single M/L even if the line was dashed.
Do x1/y1/x2/y2 become M and L commands?
Yes. Those four attributes are the only geometry; they are written as one move and one line. The <line> tag is removed.
Polyline → path → Polygon → path → Rect → path → Circle → path →
Open full editor →

Source

Type or paste SVG markup. The preview on the right updates as you type.

Ready

Live preview

PNG export · 2× for retina