How to Generate CSS Clip-Path Shapes
Create custom CSS clip-path shapes visually, from simple circles and polygons to complex custom paths for creative layouts.
- 1
Choose a shape type
Select a base shape — circle, ellipse, polygon, or inset — as the starting point for your clip path.
- 2
Adjust control points
Drag the control points to reshape the clipping area. Add or remove points for polygons to create the exact shape you need.
- 3
Preview the result
See a live preview of the clipped element. Test with different background images or colors to verify the shape works in context.
- 4
Copy the CSS
Copy the generated `clip-path` property value and apply it to your element. The output includes the complete CSS declaration.
The CSS clip-path property lets you crop any element into a custom shape — circles, polygons, stars, arrows, and organic forms. It is a powerful tool for creative layouts, image masking, and section dividers, but writing clip-path coordinates by hand is tedious. The CSS Clip-Path Generator provides a visual editor where you drag points to create your shape and get the CSS instantly.
Understanding clip-path shapes
The clip-path property accepts several shape functions that define the visible area of an element. Everything outside the shape is clipped (hidden).
circle() creates a circular clipping region. You specify the radius and optional center position: clip-path: circle(50% at center) creates a circle that fills the element. ellipse() works similarly but with separate horizontal and vertical radii.
inset() creates a rectangular clip with optional rounded corners. It takes values for top, right, bottom, and left insets from the element’s edges: clip-path: inset(10px 20px 10px 20px round 8px).
polygon() is the most versatile — it defines a shape using a series of x/y coordinate pairs. Points are specified as percentages or lengths: clip-path: polygon(50% 0%, 100% 100%, 0% 100%) creates a triangle. You can add as many points as you need for complex shapes.
The path() function accepts an SVG path string for the most complex shapes, but it is harder to edit visually and less commonly used for CSS-only designs.
Tips and best practices
- Use percentages for responsive shapes. Percentage-based coordinates scale with the element, keeping the shape proportional at any size. Pixel values create fixed shapes that may not work at different screen widths.
- Apply to images for creative cropping.
clip-pathon<img>elements creates shaped images without Photoshop. Combine withobject-fit: coverto control how the image fills the clipped area. - Animate clip-path for transitions. You can transition between clip-path values with the same number of points. This creates dramatic reveal and morph effects:
transition: clip-path 0.3s ease. - Use for section dividers. Apply
clip-pathto full-width sections to create diagonal, wave, or custom-shaped transitions between page sections instead of flat horizontal lines. - Combine with background gradients. Clip-path shapes with gradient backgrounds create striking visual elements without any image files.
Common issues
- Content clipped unexpectedly.
clip-pathclips everything including text, borders, and box-shadows. If you need the shape only for the background, consider using a pseudo-element withclip-pathinstead of applying it to the entire element. - Hover and click areas follow the clipped shape. Pointer events only register within the visible (clipped) area. Users cannot click on clipped-out regions, which can be confusing if the element’s bounding box suggests a larger interactive area.
- Animations require matching point counts. CSS transitions between
polygon()values only work if both shapes have the same number of points. Add invisible points (positioned on existing edges) to match point counts between shapes.
Open CSS Clip Path Generator
Use the CSS Clip Path Generator tool directly — no sign-up needed. Runs entirely in your browser.
Open CSS Clip Path Generator
Comments