Clip an element to a polygon, circle, ellipse or inset shape, adjust it against a live preview, and copy a clip-path you can paste straight in.
A polygon preset. The points are percentages of the element's own box, so the shape stretches with it rather than keeping its proportions — which is usually what you want for a banner and rarely what you want for an icon.
Clipping does not change layout. The element still occupies its whole box, so text beside a clipped shape flows around the rectangle rather than the shape. It also cuts away everything the element paints, including its own box-shadow — a shadow on a clipped shape needs a drop-shadow filter on a wrapper instead.
.clipped {
clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}CSS Clip Path Generator runs entirely on your device — nothing is uploaded.
You’re on the Free plan. Compare plans
`clip-path` hides part of an element without changing the space it occupies. The element still takes its full size in the layout; you simply cannot see the clipped part, and you cannot click it either — pointer events are clipped along with the pixels, which is the behaviour that makes an angled section usable rather than a trap.
`polygon()` is the one that does most of the work. Points are listed as x y pairs, in order, and percentages resolve against the element's own box — so a shape written in percentages stretches with the element, and the same shape in pixels does not. Both are valid and the choice is a real one.
`inset()` is worth knowing because it is the only basic shape that takes a radius. `inset(10% round 12px)` crops in from every edge and rounds the result, which is the quickest way to a rounded crop that ignores the element's own border-radius.
What clip-path cannot do is feather an edge. Every clip is hard: a pixel is either inside the shape or outside it, and there is no partial coverage. For a soft or gradient-faded edge the tool is `mask-image`, which takes a gradient or an image and uses its alpha. The shapes here are the hard-edged family, and the page says so rather than letting you discover it on a design review.
No. The element occupies exactly the same space as before; only its visible pixels are reduced. That is usually what you want, and it does mean a clipped element can still push its neighbours around with space you cannot see.
No. Pointer events are clipped along with the rendering, so the hidden area is not clickable or hoverable. This is why clip-path works for an angled hero section where an overlaid rotated div would swallow clicks.
Percentages if the shape should stretch as the element resizes, which is usually right for a section divider. Pixels if the shape must stay geometrically exact, such as a badge that should not distort.
Not with clip-path — every clip is hard-edged by definition. For a soft or faded edge, use mask-image with a gradient, which uses alpha rather than a boolean inside-or-outside test.
Because percentage coordinates resolve against width for x and height for y independently, so a shape designed on a square stretches on a rectangle. Either design it at the aspect ratio you will use, or switch to lengths.