CSS Clip-path Generator
Build a CSS polygon clip-path with draggable points, keyboard controls and percentage coordinates. Preview the shape and copy or download the generated CSS.
Drag the numbered handles, use percentage fields, or focus a handle and use arrow keys (Shift: 10%). Three to twelve vertices.
What is CSS Clip-path Generator
CSS Clip-path Generator creates a polygon clipping region for an element. It changes which part of the element is painted, rather than transforming its layout box. Use it for angled cards or decorative shapes; it does not crop and export an image file.
How to use CSS Clip-path Generator
- Start with the triangle or rectangle preset, or add vertices up to the 12-point limit.
- Drag a numbered point, use its X/Y percentage fields, or focus the handle and press arrow keys. Shift plus an arrow moves ten percentage points.
- Copy the generated rule to an element with class shape. Give the element content or dimensions and a background or image so the clipping is visible.
Features and limits
- Three to twelve ordered vertices, each constrained to 0–100% on both axes.
- Coordinates are rounded to one decimal place. Points are connected in list order; a newly added point is appended.
- The preview is square, so the same percentages can look different on a wide or tall element. Crossing edges are allowed and use the default nonzero fill rule.
This tool processes your input in this browser and does not upload it for processing.
.shape {
clip-path: polygon(50% 5%, 95% 95%, 5% 95%);
}
/* Apply to a visible element with width and height or content. */Frequently asked questions
Does clip-path change the layout size?
No. Clipping affects painting and hit testing, not the layout box reserved by the element. Content outside the region is clipped.
Can I operate the editor without dragging?
Yes. Each point has numeric percentage inputs. Focus a numbered handle and use arrow keys; hold Shift for ten-point increments.
Why does the shape change on a rectangular element?
X percentages are relative to box width and Y percentages to box height. The default reference box for this polygon is the border box. Test with your actual element dimensions.