ShareYourGroupShareYourGroupCSS Lab

CSS clip-path generator

The clip-path property hides everything outside a shape. Pick a shape and copy the line.

How a shape is described

Most shapes here are a polygon(): a list of corner points, each written as two percentages, across and down, measured from the top-left corner of the box. 50% 0% is the middle of the top edge, and 100% 100% is the bottom-right corner. The browser joins the points in order and hides everything outside. A circle() takes a radius and a centre; ellipse() takes two radii; inset() cuts a rectangle in from each side and can round its corners.

What clip-path does not do

Common mistakes

  1. Forgetting that the points must be in order around the shape. Swapping two points makes a twisted bow-tie shape.
  2. Using pixels in a responsive layout. Percentages keep the shape when the box changes size.
  3. Putting clip-path on a container and then wondering why the child's shadow vanished: children are clipped as well.
Which browsers support clip-path with polygon?

We checked the polygon, circle, ellipse and inset forms in current Chrome and WebKit on 13 November 2026, and all worked.

Can I animate between two shapes?

Yes, if both polygons have the same number of points, the browser can move one into the other with a transition on clip-path.

This is an independent site. It is not connected with the W3C, MDN, Google, Apple, Mozilla or Microsoft. Browser and product names belong to their owners.