Use SVG Path Editor

Enter your data below to use the SVG Path Editor

📌 Try these examples:
RESULT

Last updated

Understanding SVG Path Data

The SVG <path> element is the most powerful SVG shape — it can represent any 2D shape using a series of commands in the d attribute. Path data is a compact string of commands and coordinates that describe how to draw the shape, similar to giving drawing instructions: "move here, draw a line there, curve to this point."

Path Command Reference

CommandUppercase (absolute)Lowercase (relative)
Move toM x,ym dx,dy
Line toL x,yl dx,dy
HorizontalH xh dx
VerticalV yv dy
Cubic BézierC x1,y1 x2,y2 x,yc dx1,dy1 dx2,dy2 dx,dy
Smooth cubicS x2,y2 x,ys dx2,dy2 dx,dy
QuadraticQ x1,y1 x,yq dx1,dy1 dx,dy
ArcA rx,ry rot large sweep x,ya ...
Close pathZz

Drawing a Star with Path

JavaScript
function starPath(cx, cy, outerR, innerR, points = 5) {
  const step = Math.PI / points;
  let d = '';
  for (let i = 0; i < 2 * points; i++) {
    const r     = i % 2 === 0 ? outerR : innerR;
    const angle = i * step - Math.PI / 2;
    const x     = cx + r * Math.cos(angle);
    const y     = cy + r * Math.sin(angle);
    d += (i === 0 ? 'M' : 'L') + `${x.toFixed(2)},${y.toFixed(2)} `;
  }
  return d + 'Z';
}

// 5-pointed star centered at (100,100)
console.log(starPath(100, 100, 50, 20, 5));

Frequently Asked Questions

Simply enter your data, click the process button, and get instant results. All processing happens in your browser for maximum privacy and security.