CSS Clip-Path Maker

CSS Code

                        

What is CSS Clip-path?

The clip-path CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. It allows you to "cut out" specific shapes from images or containers.

Historically, non-rectangular layouts required complex PNGs or SVGs. Now, you can achieve shapes like triangles, polygons, and circles with a single line of CSS, fully responsive and ready for animation.

Supported Shapes

1. Polygon

clip-path: polygon(50% 0%, 100% 100%, 0% 100%);

The most flexible function. Define a custom polygon by specifying a series of x y coordinates. Minimum 3 points.

2. Circle

clip-path: circle(50% at 50% 50%);

Defines a circle using a radius and a center position. Syntax: circle(radius at x y).

3. Ellipse

clip-path: ellipse(25% 40% at 50% 50%);

Similar to a circle, but allows you to specify separate horizontal and vertical radii.

4. Inset

clip-path: inset(10% 20% 10% 20%);

Defines an inset rectangle. You specify distance from the top, right, bottom, and left edges.

Common Use Cases

FAQ

Is clip-path supported in all browsers?
Yes, modern browsers (Chrome, Firefox, Safari, Edge) fully support clip-path. In very old browsers (like IE), the property is ignored, and the element will show as a standard rectangle (graceful degradation).
Does clipping actually remove the element?
It's only a visual mask. The element still occupies its original rectangular space in the layout, but mouse events (clicks) outside the clipped area will pass through to elements behind it.
How can I add a border to the clipped shape?
Standard css borders adhere to the original box. To border a clipped shape, you typically use a drop-shadow filter or layer a slightly larger element behind the main one.
Can I clip text?
No. clip-path applies to the container. If you want to clip the background to the text (text mask), use background-clip: text.
Can I use the generated code directly?
Yes! The tool generates responsive percentage-based code. You can paste it directly into your CSS, and it will scale correctly with your element's size.
Is this tool free?
Yes, this tool is 100% free. All calculations happen in your browser, so your images and data never leave your device.

More Free CSS Tools