SVG Path Shape Morphing Playground
Paste two SVG path strings, scrub the morph in real time, and export CSS @keyframes or GSAP code - all client-side.
Move the slider to generate the interpolated d value.
Provide valid start and end paths to generate animation code.
Provide valid start and end paths to generate GSAP code.
No paths loaded yet.
The Complete Guide to SVG Path Morphing
SVG morphing is one of the most visually striking animation techniques on the web - a button that transforms into an arrow, a logo that reshapes into a checkmark, a circle that blooms into a star. Unlike image crossfades, a path morph is resolution-independent, hardware-accelerated, and scriptable with pure CSS or a few lines of JavaScript.
How to Use This Tool
Paste your start shape's d attribute into the left pane and your end shape's d attribute into the right pane. The green dot indicates valid SVG path syntax. Use the Morphing Helper dropdown to load a preset if you want a quick demo. Drag the Animation Progress slider to scrub through the morph frame by frame. When you are happy with the shape pair, copy the CSS @keyframes or GSAP code from the output cards and drop it directly into your project.
If your shapes have mismatched node counts, the normalization engine automatically subdivides the simpler path. The Normalization Report card shows exactly how many segments each path had before and after normalization so you know what was changed.
How the Interpolation Engine Works
Once both paths are normalized to the same segment count, the morph is computed with linear interpolation on every coordinate pair. For a progress value p (0 to 1), each output coordinate is xFinal = xStart + (xEnd - xStart) * p and yFinal = yStart + (yEnd - yStart) * p. The resulting d string is assembled from these blended coordinates and rendered live in the SVG canvas on every slider tick.
For the CSS export, the tool generates a full @keyframes block with the start path at 0% and the end path at 100%, plus the animation shorthand property. For GSAP, it outputs a gsap.to() call targeting the path element's attr.d property, which works without any plugins for simple linear morphs.
Tips for Best Results
Both paths should share the same viewBox coordinate space. If one was drawn in Figma at 24x24 and the other in Illustrator at 512x512, scale one to match the other before pasting. Avoid mixing open paths (no Z command) with closed paths (ends with Z) - the morph will still work, but the fill behavior may look unexpected. For complex illustrations with multiple sub-paths (using M...Z M...Z), use each sub-path individually.