SVG Path Length Calculator

Calculate the total length of SVG paths. Get exact path lengths in pixels, mm, or cm for animation timing, CNC cutting time estimation, and layout.

Drop SVG file to analyse or click to browse

Extract path coordinates, length, bounds & georeference

Visual Path Render

Closed Paths Open Paths

How to Use

1

Upload SVG or paste path

Upload SVG or paste the path "d" attribute.

2

Set unit conversion

Select DPI and target unit (px, mm, cm, inch) for physical length.

3

View path lengths

See the length of each path and the total length of all paths.

Calculating SVG Path Lengths

The SVG specification provides a getTotalLength() method on SVGPathElement, but this requires a browser DOM — it is not available in server-side or build tool contexts. This calculator implements the same computation in pure JavaScript, making it available without a browser DOM and providing per-segment breakdowns not available through the native API.

Real-World Examples & Use Cases

CSS Draw Animation

Calculate the exact path length to set stroke-dasharray for an SVG draw-on animation.

CNC Cutting Time

Calculate total cut path length to estimate cutting time at a given feed rate.

Frequently Asked Questions

What is path length used for?
Path length is used for: stroke-dasharray/dashoffset CSS animations (draw-on effect), CNC cutting time estimation, embroidery thread usage, and layout calculations.
How is curve length calculated?
Bézier curve lengths are calculated numerically using Gaussian quadrature integration — the same method used by browsers to calculate SVGPathElement.getTotalLength().

Related Tools

Explore other tools in this category.

Looking for something else?