What's an SVG path?
The path element is the workhorse of SVG. A single d attribute encodes any 2D shape, a circle, a logo, an icon, a hand-drawn curve, as a sequence of single-letter commands followed by numeric arguments. M 10 20 L 30 40 is "move to (10, 20), then line to (30, 40)." Read enough path strings and the letters become as legible as English.
This editor parses your d string into commands, draws the resulting path inside an inline SVG with a grid, and gives you draggable handles for every anchor and control point. Drag a handle and the d string updates in lockstep; type into the d field and the canvas updates. Either direction is the source of truth.
How to use it
1. Paste a d string into the input, just the path data, no surrounding <path> element. The "Sample" button drops in an example with cubic Béziers. 2. Drag handles on the canvas. Filled circles are anchor points (the path passes through them); hollow circles are Bézier control points (the path is pulled toward them but doesn't pass through). Dashed lines connect each anchor to its control points so you can see the geometry. 3. Read the commands list for index, command type, and argument values. Useful for debugging "why does this curve look weird", usually a stray 0 or transposed pair. 4. Copy the cleaned-up d string or Download SVG to get a complete file with viewBox set to the path's bounding box.
The command vocabulary
| Letter | Name | Args | What it does |
|---|---|---|---|
| `M` / `m` | moveto | `x y` | Pick up the pen; move it to a new position. The path doesn't draw between the previous point and this one. |
| `L` / `l` | lineto | `x y` | Draw a straight line from the current point to `x y`. |
| `H` / `h` | horizontal | `x` | Horizontal line, only one coordinate. |
| `V` / `v` | vertical | `y` | Vertical line. |
| `C` / `c` | cubic Bézier | `x1 y1 x2 y2 x y` | Two control points and a destination. The most common curve. |
| `S` / `s` | smooth cubic | `x2 y2 x y` | Continues a previous `C`/`S` smoothly, the first control point mirrors the previous one. |
| `Q` / `q` | quadratic Bézier | `x1 y1 x y` | Single control point. Cheaper, less control than cubic. |
| `T` / `t` | smooth quadratic | `x y` | Like `S` but for `Q`. |
| `A` / `a` | elliptical arc | `rx ry rot large-arc sweep x y` | Seven parameters because arcs are hard. |
| `Z` / `z` | close | (none) | Draw a straight line back to the last `M`. |
Uppercase = absolute (coordinates are in viewport space). Lowercase = relative (offsets from the previous point). The editor parses both, but normalizes everything to absolute internally so dragging is predictable.
Reading the canvas
- Filled handles, anchor points. The path actually passes through these.
- Hollow handles, control points. The curve bends toward them but doesn't reach.
- Dashed lines, links from anchor to its associated control point. They aren't part of the path; they're a visual aid so you can see how each Bézier is shaped.
- Grid, auto-scaled to roughly 1/10 of the bounding box, snapped to a "nice" round number (1, 2, 5, 10, 20, 50, 100, …). Toggle off with the Grid switch in the toolbar.
Common gotchas
- Negative numbers without spaces.
M0 0L10 10is valid; the parser splits on the negative sign. ButL-5-10works too, the parser handles both. - Implicit command repetition.
L 10 10 20 20means "line to (10, 10) then line to (20, 20)", the editor unpacks this into twoLcommands so each row in the commands list has the right argument count. - Comma vs space separators. Both work and are interchangeable. The serializer emits spaces consistently.
- Arcs with sweep flags. The
large-arcandsweepflags must be 0 or 1 with NO leading sign.A 30 30 0 0 1 50 50is correct; some browsers are strict about this.
Privacy
The path string and any edits stay in your browser. The "recent" inputs list is in localStorage only. No path data is uploaded to any server.