DevLab
#
CSSintermediate

CSS Clip Path Generator

draw CSS clip-path shapes and copy the generated code

By Bikram NathLast updated

This tool generates `clip-path` CSS values by letting you drag vertices on a canvas instead of guessing coordinate percentages manually. Adjust a four-point polygon for a diagonal section divider and the output updates live, for example from `polygon(0 0, 100% 0, 100% 85%, 0 100%)` to any angle you need. It covers all three geometric clip-path functions: `polygon()`, `circle()`, and `ellipse()`.

Try it now — free, instant, no signup

What is CSS Clip Path Generator?

CSS Clip Path Generator lets you manipulate a visual canvas to define the visible region of any HTML element. Drag vertices to build a polygon, or switch to circle and ellipse modes, and the tool outputs a ready-to-copy declaration like `clip-path: polygon(50% 0%, 0% 100%, 100% 100%)` that clips the element to a triangle.

Reach for this when you need a visual reference rather than writing coordinate math by hand. Bennett Feely's Clippy is the most-referenced alternative and covers the same basic shapes; the main difference is context: if you want to preview the clip against your own artwork or quickly test multiple polygon configurations, a live canvas avoids the trial-and-error loop of editing raw percentage values in DevTools.

One sharp edge to know: `clip-path` does not remove the element from layout flow. The invisible region still occupies space and, in most browsers, still intercepts pointer events. This surprises developers who expect it to behave like `overflow: hidden`. Also, animating between two `polygon()` values requires both shapes to have the same vertex count; mismatched point counts produce a hard cut instead of an interpolated transition.

When to use CSS Clip Path Generator

Prototype a diagonal hero-section angle by dragging polygon vertices until the slope matches the design comp, then copy the exact percentages.
Mask a product image into a hexagon or custom polygon shape without switching to Photoshop or embedding SVG markup in the HTML.
Verify that two polygon() declarations share the same vertex count before writing a CSS keyframe animation between them.

Frequently Asked Questions

Why does my clip-path look correct in Chrome but jagged or misaligned in Safari?
Safari's compositor handles sub-pixel polygon coordinates differently from Chrome. The most reliable fix is rounding all percentage values to one decimal place, for example `74.5%` instead of `74.47368%`. If jagged edges persist on Retina displays, add `transform: translateZ(0)` or `will-change: clip-path` to force GPU compositing on that element. The generator outputs rounded values by default, which avoids most of these cross-browser rendering discrepancies without any manual adjustment.
Can I animate a CSS transition between a polygon() shape and a circle()?
No. CSS interpolation requires both keyframes to use the same clip-path function type. Transitioning from `polygon()` to `circle()` causes a hard cut because the browser cannot interpolate between different function syntaxes. The standard workaround is to approximate the circle as a polygon with enough vertices, typically 8 or more evenly spaced points, so both keyframes use `polygon()` with matching point counts. Only then will the browser smoothly interpolate the shape transition.
What is the difference between CSS clip-path shape functions and an SVG clipPath element?
CSS `clip-path` with functions like `polygon()` or `circle()` is applied via a style property and works directly on HTML elements without extra markup. An SVG `<clipPath>` element is defined in the document and referenced via `clip-path: url(#myClip)`, which allows any SVG shape, text, or use-element to act as the clip region. The SVG approach handles complex freeform curves that geometric CSS functions cannot express; the CSS functions are simpler and are exactly what this tool generates.
Why is the clipped area of my element still blocking click events on elements underneath it?
`clip-path` only affects rendering, not hit-testing. The full rectangular bounding box of the element remains active for pointer events, including the invisible clipped region. To fix this, add `pointer-events: none` to the clipped element and selectively re-enable it on child elements that need interaction. Alternatively, restructure the layout so interactive elements sit outside the region that would be clipped, which avoids the pointer-event overlap entirely without resorting to the pointer-events override.
Does clip-path: path() have reliable browser support, or should I stick to polygon() for production?
As of 2026, `clip-path: path()`, which accepts SVG `d` attribute syntax for freeform curves, is supported in Chrome 88+, Firefox 97+, and Safari 15.4+. For most production projects, `polygon()`, `circle()`, and `ellipse()` are the safer choice because they have had stable cross-browser support since roughly 2017 and work in older Android System WebView versions. If your project needs curved clip regions and your browser-support floor permits it, `path()` is viable, but verify your minimum target before shipping.

Related Tools