Productive Toolbox

SVG Path Visualizer

Paste an SVG path d attribute to see it drawn on a grid, with every command explained, a fit-to-path viewBox and copy-ready SVG code.

Styling

ViewBox

Grid

Path Commands Explained (5)

M 10 10Move to (10, 10)
H 90Horizontal line to x = 90
V 90Vertical line to y = 90
H 10Horizontal line to x = 10
Z Close path

Reading SVG Path Data

An SVG <path> draws its shape from the d attribute: a sequence of commands, each a single letter followed by numbers. Think of it as instructions to a pen: move here, draw a line there, curve through this point, close the shape.

<path d="M10 10 H90 V90 H10 Z" />

move to (10,10) → right to x=90 → down to y=90 → left to x=10 → close

Coordinates are in the units of the SVG's viewBox, not pixels: viewBox="0 0 100 100" means the drawing area runs from 0 to 100 in both directions, however large the image is displayed. Numbers can be separated by spaces or commas, and a minus sign also separates them, which is why exported icons often look like l-5.2-3.1.

SVG Path Commands Reference

CommandParametersWhat it doesExample
M / mx yMove the pen without drawing; starts every pathM10 10
L / lx yStraight line to a pointL90 90
H / hxHorizontal lineH90
V / vyVertical lineV90
C / cx1 y1 x2 y2 x yCubic Bézier curve with two control pointsC20 0, 80 0, 90 50
S / sx2 y2 x ySmooth cubic curve; first control point mirrors the last oneS150 100, 170 50
Q / qx1 y1 x yQuadratic Bézier curve with one control pointQ50 0 90 50
T / tx ySmooth quadratic curve; control point is mirroredT170 50
A / arx ry rotation large-arc sweep x yElliptical arcA40 40 0 1 0 90 50
Z / z–Close the path with a line back to the startZ

Uppercase letters use absolute coordinates, lowercase letters are relative to the current point. After M, extra coordinate pairs are treated as L commands.

How to Use the SVG Path Visualizer

  1. 1Paste the path data: Paste the value of a path's d attribute, pick a sample shape, or upload an SVG file to pull out its paths.
  2. 2Check the drawing: See the path on a grid; errors such as a missing starting M or a command without enough numbers are pointed out.
  3. 3Read the commands: The command list explains each step in plain words, with relative coordinates converted to absolute positions.
  4. 4Fit and export: Set the stroke, fill and viewBox or fit the viewBox to the path, then copy the complete SVG code.

Frequently Asked Questions

What is the d attribute of an SVG path?

The d (data) attribute holds a list of drawing commands, each a letter followed by numbers. M 10 10 moves the pen to (10, 10), L 90 90 draws a straight line to (90, 90) and Z closes the shape. Everything from icons to logos is built from these commands.

What is the difference between upper- and lowercase commands?

Uppercase commands use absolute coordinates measured from the origin of the viewBox; lowercase commands are relative to the current point. M10 10 L20 20 and M10 10 l10 10 draw the same line.

How does the SVG arc command work?

A rx ry rotation large-arc sweep x y draws part of an ellipse with radii rx and ry to the point (x, y). Because two ellipses and two directions can connect two points, large-arc (1 or 0) picks the longer or shorter arc and sweep (1 or 0) picks clockwise or counter-clockwise.

Why is my path cut off or not visible?

Usually the viewBox does not cover the path's coordinates, the fill and stroke are both none, or the stroke width is tiny compared with the viewBox. Use Fit to path to set the viewBox from the path's real bounds, curves included.

How do I make a circle with a path?

Use two arcs, because one arc cannot start and end at the same point: M10 50 A40 40 0 1 0 90 50 A40 40 0 1 0 10 50 Z draws a circle of radius 40 centred at (50, 50). In plain SVG the <circle> element is simpler.

Is my SVG uploaded anywhere?

No. We do not collect or store your files.