User Rating 0.0
Total Usage 0 times
Preview
Auto-Fit
Input Path Data (d)
Result
0 commands
Is this tool helpful?

Your feedback helps us improve.

About

This tool transforms SVG path data between Absolute (uppercase) and Relative (lowercase) coordinates. While both render the exact same shape, they serve different engineering purposes. Absolute coordinates define points relative to the SVG origin 00, making them ideal for strict geometric transformations. Relative coordinates define points as a delta v from the previous position, often reducing file size for web optimization.

Mismanaged path data is a silent killer of render performance. Excessive decimal precision (e.g., 10.0000001) adds bloat without visual gain. This tool includes a precision engine to mathematically round values, ensuring your SVG code is as lightweight as possible while maintaining visual fidelity.

svg path vector coordinates web-design

Formulas

The core transformation logic relies on vector addition. For a command converting from Relative to Absolute:

Pabs = Pcurrent + Prel

Where P represents the coordinate vector xy. Conversely, to find the Relative value from an Absolute target:

Prel = Ptarget Pcurrent

Special handling is applied to Smooth curves (S, T), where the first control point c1 is calculated as the reflection of the previous control point c2prev about the current point Pcurrent:

c1 = 2Pcurrent c2prev

Reference Data

CommandNameArgsDescription
M / mMove Tox, yLift pen and start new subpath.
L / lLine Tox, yDraw straight line to point.
H / hHorizontalxDraw horizontal line.
V / vVerticalyDraw vertical line.
C / cCubic Bezierx1,y1 x2,y2 x,yCurve with two control points.
S / sSmooth Cubicx2,y2 x,yReflects previous control point.
Q / qQuad Bezierx1,y1 x,yCurve with one control point.
T / tSmooth Quadx,yReflects previous control point.
A / aElliptical Arcrx ry rot fA fS x yDraws an arc.
Z / zClose Path-Draws line back to start.

Frequently Asked Questions

Relative paths often result in smaller file sizes. Because the numbers represent small distances (deltas) rather than large canvas coordinates, they often require fewer digits. For example, "l 1 1" is shorter than "L 150.5 200.5".
Yes. SVG paths often contain values like 1.5e-2. This tool's parser correctly identifies and processes scientific notation during conversion.
The "Z" (or 'z') command closes the path by drawing a straight line back to the start of the current subpath (usually the last Move To "M" command). It has no coordinates, so it remains largely unchanged, though its case will match your output selection.
If you use Smooth curves (S or T), they mathematically rely on the control point of the *previous* command. If you delete or alter the previous command, the reflection logic breaks. Converting to Absolute/Full Cubic (C) first can make manual editing safer.