SVG Path Generator
A precision pen tool with real Bézier handles, plus freehand sketching. Draw with click and click-drag, edit every anchor, and copy production-ready path data instantly.
Shape Library
Presets replace the current drawing — Ctrl+Z brings it back.
Canvas
Click for a corner · click-drag for a curve · click the first anchor to close
Export Code
Download Files
PNG renders with a transparent background at 2× resolution from the current stroke and fill style.
Style
Path Output
Uppercase commands with absolute coordinates.
Canvas & Grid
Freehand & Drawing
Catmull-Rom spline with balanced curve fidelity.
Reference Image (Trace)
Upload Image to Trace
PNG, JPG, SVG, WebP background layer
The Architecture of SVG Paths & Vector Mathematics
An SVG path is not a raster image—it is a continuous mathematical instruction set rendered in real time by your browser's graphics pipeline. By mastering cubic polynomial tangents, Catmull-Rom spline tension, and coordinate normalization, engineers and designers can build ultra-responsive UI graphics that weigh less than 500 bytes and scale flawlessly across every device pixel density.
Third-degree cubic Bernstein formulas ($P_0 \to C_1 \to C_2 \to P_1$) ensure smooth curvature without angular kinks or unintended inflection warping.
Uniform tension velocity tangents ($k = \text{tension} / 6$) calculate handle vectors smoothly in real time, eliminating loop-backs and wild overshoots.
One-click conversion to typed React/Next.js components, hardware CSS clip-paths, and Framer Motion keyframes ready for immediate deployment.
SVG Path Command Grammar & Primitive Dissector
Select any command below to inspect its geometric behavior, control handle anatomy, syntax signature, and production optimization tips.
CCubic Bézier Curve
“Two independent handles (c1 & c2) govern exit velocity and arrival tangent for smooth S-curves.”
The cubic Bézier is the cornerstone of digital vector design. Handle C1 dictates departure velocity from P0, while C2 guides deceleration into P1, granting total freedom over inflection points and organic silhouettes.
<path d="M 40 140 C 60 20, 180 20, 200 140" fill="none" stroke="#60a5fa" stroke-width="2.5" />
Bézier Geometry: Mastering $C^0$, $C^1$, and $C^2$ Continuity
The difference between crisp vector icons and amateur shapes lies in how handles are aligned across shared anchor points:
Sharp Cusps & Corners
Endpoints meet at identical coordinates, but tangent angles diverge. Used for spikes, heart notches, and hard mechanical cuts.
Collinear Tangents
Incoming and outgoing handles lie on a continuous 180° axis. The first derivative is unbroken, eliminating sudden direction jumps.
Organic Flow Surfaces
Both tangent direction and curvature radius rate of change match across the anchor. Standard for luxury automotive surfacing and typography.
Production Framework Snippets & Component Integrations
Choose your target runtime to review production-ready boilerplate with accessibility attributes, TypeScript typing, and performance flags pre-configured.
import React, { forwardRef } from "react";
export interface VectorIconProps extends React.SVGProps<SVGSVGElement> {
size?: number | string;
strokeColor?: string;
fillColor?: string;
strokeWidth?: number;
}
export const VectorIcon = forwardRef<SVGSVGElement, VectorIconProps>(
(
{
size = 24,
strokeColor = "currentColor",
fillColor = "none",
strokeWidth = 2,
className,
...props
},
ref
) => {
return (
<svg
ref={ref}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 800 600"
width={size}
height={size}
fill={fillColor}
stroke={strokeColor}
strokeWidth={strokeWidth}
strokeLinecap="round"
strokeLinejoin="round"
aria-hidden="true"
className={className}
{...props}
>
<path
d="M 120 480 C 180 320, 320 200, 480 240 C 600 270, 680 400, 720 480 Z"
vectorEffect="non-scaling-stroke"
/>
</svg>
);
}
);
VectorIcon.displayName = "VectorIcon";Production Vector Engineering: Performance & Payload Rules
High-traffic websites demand fast First Contentful Paint (FCP). Follow these guidelines to keep vector payloads minimal and rendering frames smooth:
Coordinate Truncation
Payload Savings: ~52%Exporting points like 142.84918274 increases SVG text bytes without improving visual fidelity. Rounding coordinates to integers or 1 decimal place reduces payload by up to 52% without shifting visible pixels.
Standardized viewBox Coordinates
Zero Layout ShiftAuthor inside standard matrices (0 0 24 24 for icons, 0 0 800 600 for hero graphics). Omit hardcoded width and height attributes from inline SVGs so CSS grid and flexbox control responsiveness cleanly.
Non-Scaling Stroke Invariance
vector-effect="non-scaling-stroke"When scaling responsive SVGs, stroke outlines scale proportionally unless instructed otherwise. Adding vector-effect="non-scaling-stroke" keeps border thickness invariant (e.g., exactly 2px) regardless of whether the icon is 16px or 256px wide.
Subpath Merging & Winding Rules
Single Draw Call OptimizationCombine multi-part shapes into a single path string separated by 'M' commands. Use fill-rule="evenodd" for hollow shapes (donut cutouts and letters like 'O') so inner holes are punched out automatically without tracking vector winding directions.
Industry Applications: Where Custom SVG Paths Deliver 10x ROI
Design System Iconography
Build custom icon families mapped to 24px grids with consistent visual weight and clean anchor topology for web and native mobile apps.
Organic Hero Dividers
Replace 250KB hero wave PNG banners with 400-byte inline SVG paths, improving Core Web Vitals LCP scores by up to 40%.
CSS Masking & Cutouts
Create diagonal testimonial cards, slanted headers, and organic profile avatars using direct clip-path: path(...) CSS styling.
Interactive Logo Morphs
Export identical-anchor path sets for seamless shape morphing and line-drawing transitions with GSAP MorphSVG and Framer Motion.
Frequently Asked Questions: Vector Math & SVG Development
How does the SVG path 'd' attribute syntax work under the hood?
The 'd' (data) attribute contains a series of compact command letters and numeric coordinate pairs. The browser's native vector rasterizer (such as Skia in Chromium, CoreGraphics in WebKit Safari, or Direct2D in Edge) processes these instructions sequentially like a robotic pen: 'M' moves the pen, 'L' draws linear segments, 'C' executes third-order cubic polynomial Bézier interpolation, and 'Z' connects back to the start. Because paths execute as GPU instructions, vector geometry scales infinitely without pixelation.
What is the difference between absolute (uppercase) and relative (lowercase) commands?
Uppercase commands (e.g. M 100 100 L 200 200) specify absolute coordinates anchored within the SVG viewBox coordinate matrix. Lowercase commands (e.g. m 10 10 l 50 0) represent relative coordinate offsets added to the preceding point. Absolute commands are easier to align to design grids, whereas relative commands can compress SVG file sizes by 10–20% when chained across localized deltas.
How do Cubic Bézier ('C') curves differ mathematically from Quadratic Bézier ('Q') curves?
A Cubic Bézier curve ('C') evaluates a 3rd-degree polynomial equation P(t) = (1-t)³P₀ + 3(1-t)²tC₁ + 3(1-t)t²C₂ + t³P₁. Because it features two independent control handles (C₁ for departure trajectory and C₂ for arrival angle), it can create complex S-curves and inflection points. A Quadratic Bézier ('Q') evaluates a 2nd-degree polynomial with a single shared control handle, generating simpler parabolic arcs with lower computational overhead.
How can I animate an SVG path with CSS keyframes or Framer Motion?
Vector stroke reveal animations work by setting CSS 'stroke-dasharray' and 'stroke-dashoffset' to the total path length (calculable in JavaScript via svgPath.getTotalLength()). When 'stroke-dashoffset' equals the path length, the stroke is completely hidden; animating it down to 0 creates the illusion of the stroke drawing itself. In Framer Motion, this is automated natively by animating 'pathLength: [0, 1]'.
Can I use an SVG path inside CSS 'clip-path' for non-rectangular containers?
Yes! Modern browsers natively support 'clip-path: path("...")'. You can copy your exported path string directly into CSS to sculpt hero sections, diagonal cards, or organic avatars without wrapping HTML elements in complex SVG masks. For containers that must scale dynamically, normalize the coordinates between 0.0 and 1.0 inside an SVG <clipPath clipPathUnits="objectBoundingBox"> and reference it via 'clip-path: url(#id)'.
How does the Catmull-Rom freehand smoothing algorithm work in this tool?
When you draw freehand with the Pen/Sketch tool, raw pointer events are recorded and simplified with the Ramer-Douglas-Peucker (RDP) algorithm to eliminate jitter. The tool then calculates smooth Catmull-Rom tangent velocity vectors at each anchor point based on neighbor positions (P[i-1] and P[i+1]) scaled by a uniform tension factor (k = tension / 6). These velocity vectors are converted into cubic Bézier control handles (c1 and c2), guaranteeing silky, overshoot-free curves.
Why does my exported SVG look blurry on 1x resolution displays?
Sub-pixel blurring occurs when anchor coordinates or stroke centerlines fall on fractional pixel values (such as x=12.35 instead of x=12.0) on standard-density displays. To ensure razor-sharp geometry, enable 'Snap to Grid' in the Canvas panel to align anchors with integer coordinates, and use even-numbered stroke widths (or a 0.5px offset when aligning directly along grid intersections).
Is this SVG path generator private, and does it upload my reference images?
No data is ever sent to any remote server. Axonix processes 100% of the vector path math, reference image rendering, Catmull-Rom conversions, and file exports locally inside your web browser using HTML5 Canvas and SVG DOM APIs. Your uploaded trace images and proprietary vector designs remain strictly on your local device.
Companion Design & Developer Tools
Explore All 100+ ToolsImage Converter
Convert images between JPG, PNG, WEBP, AVIF, and HEIC.
Image Resizer
Resize images by pixels. Change dimensions instantly with aspect ratio lock.
Color Picker
Pick colors and generate harmonious palettes.
Font Pairer
Preview and find perfect typography combinations for your web projects.
Contrast Checker
Verify color contrast ratios against WCAG accessibility standards.
ASCII Art Generator
Transform your text into retro-style ASCII patterns and banners.