SVG Path Analyzer
Paste any SVG path data to visualize the shape, break down each command (M, L, C, Q, A, Z and more), understand arguments for curves and arcs, and calculate the exact bounding box using the browser's native API.
Frequently Asked Questions
What is SVG path data?▼
SVG path data is the value of the 'd' attribute in an SVG <path> element. It's a mini-language of commands and coordinates that defines any shape — lines, curves, arcs, and complex polygons. For example, 'M 10 10 L 100 100 Z' moves to (10,10), draws a line to (100,100), and closes the path.
What do the path command letters mean?▼
M/m = Move To (start a new subpath), L/l = Line To (straight line), H/h = Horizontal Line, V/v = Vertical Line, C/c = Cubic Bézier curve (two control points), S/s = Smooth Cubic Bézier, Q/q = Quadratic Bézier (one control point), T/t = Smooth Quadratic Bézier, A/a = Elliptical Arc, Z/z = Close Path. Uppercase = absolute coordinates, lowercase = relative coordinates.
What is the difference between absolute and relative commands?▼
Uppercase commands (M, L, C…) use absolute coordinates — the position is measured from the SVG viewport origin (0,0). Lowercase commands (m, l, c…) use relative coordinates — the position is measured from the current pen position. For example, 'L 100 100' moves to (100,100), while 'l 100 100' moves 100 units right and 100 units down from wherever the pen currently is.
What is a cubic Bézier curve and how does it work?▼
A cubic Bézier (C command) takes 6 arguments: two control points and an end point — cp1x cp1y cp2x cp2y x y. The control points act like magnets pulling the curve. cp1 controls the curve near the start point, cp2 controls the curve near the end point. The more the control points deviate from the line between start and end, the more pronounced the curve.
How do I get the bounding box of a path?▼
This tool uses the browser's native SVGPathElement.getBBox() API to calculate the exact bounding box — the smallest axis-aligned rectangle that contains the entire path. This accounts for curves that extend beyond their control points. The result gives you minX, minY, width, and height.
How can I use this for icon or illustration work?▼
Use the command breakdown to understand existing SVG paths from icon libraries. The bounding box helps you calculate the correct viewBox for scaling. You can identify complex curve sequences (C/S combinations) that form smooth shapes, and simplified paths using only L/H/V for geometric icons. Understanding the command breakdown is also useful for animating paths with CSS or GSAP.
Related Products
on GumroadTypeScript Quick Reference Toolkit
5 practical reference files for TypeScript developers: cheatsheet, TS vs JS comparison, 20 utility types with real examples, tsconfig best practices template, and 15 common mistakes guide. Print it. Keep it on your desk.
Buy on Gumroad →DevToolkit Starter Kit
A ready-to-deploy developer tools website with 12 built-in tools. Astro + Preact + Tailwind. Deploy to Cloudflare Pages for free. Built-in SEO, dark mode, and ad-ready layout.
Buy on Gumroad →DevPlaybook Interview Vault
210+ real technical interview questions with model answers, asked at Google, Meta, Amazon, Microsoft, Stripe, and Shopify. Covers Frontend (55), Backend (55), System Design (50), and DSA (50). Available in English and Traditional Chinese.
Buy on Gumroad →You Might Also Need
SVG Editor & Optimizer
Paste, preview, format, and optimize SVG code in your browser. Removes comments, collapses whitespace, shortens hex colors, and reduces file size. Generate base64 data URIs and download clean SVGs.
Open free tool →
SVG Path Editor
Edit SVG path d attributes visually. Drag control points on a live canvas, choose from preset shapes, and copy the output. Supports M, L, C, Q, Z commands with Bézier curve handles.
Open free tool →
SVG Optimizer / Minifier
Optimize and minify SVG files in your browser. Removes comments, metadata, editor data, and whitespace. Typically reduces SVG size by 30-70%. Free, 100% client-side.
Open free tool →
More Free Tools
Related Articles
SVG Optimization Techniques: Reduce File Size by 70% Without Quality Loss
Step-by-step SVG optimization guide. Use SVGO, manual techniques, and build tool integration to cut SVG file sizes by 50-80% while preserving visual quality.
TypeScript 5.5 New Features: Complete Guide for Developers 2026
Everything you need to know about TypeScript 5.5: inferred type predicates, isolated declarations, JSDoc @import tag, new Set methods, and performance improvements. With practical code examples.
Best Tailwind CSS Tools and Resources for Developers in 2026
The complete guide to Tailwind CSS tools in 2026. Component libraries, UI generators, VS Code extensions, playground tools, and cheatsheets that make building with Tailwind faster and more productive.
Color Picker Hex RGB — Convert and Pick Colors for Web Development
Color picker hex RGB — convert between HEX, RGB, HSL, and CSS color formats instantly. Learn how color systems work in CSS, JavaScript, and design tools with practical examples.
CSS Gradient Generator Online: Create Linear, Radial & Conic Gradients Free
Generate beautiful CSS gradients online for free. Build linear, radial, and conic gradients visually, copy the CSS code, and use it instantly in your project — no install needed.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →