CSS Clip Path Generator
Build clip-path shapes visually. Drag vertices, pick presets, and copy the CSS.
How to Use the Clip Path Generator
- Choose a shape type — Polygon for custom multi-point shapes, Circle for perfect circles, Ellipse for ovals, or Inset for rectangular clips. Use Presets for instant common shapes.
- Edit the shape — In Polygon mode, drag the white dots on the preview to move vertices. Use "Add Vertex" to add more points. In other modes, use the sliders.
- Apply a preset — Click any preset shape to load its polygon coordinates instantly.
- Copy the CSS — Click Copy to grab the clip-path declaration, or Download to save it as a .css file.
Understanding CSS clip-path
The clip-path property clips an element to a defined shape. Anything outside the shape is invisible, while anything inside is fully visible. Unlike overflow: hidden which clips to the element's rectangular bounds, clip-path can use any geometric shape, creating triangles, arrows, hexagons, stars, and smooth curves.
Shape Types
- polygon() — The most flexible type. Define any number of vertex points as percentage or pixel coordinates. Used for triangles, arrows, stars, chevrons, and custom brand shapes.
- circle(radius at x y) — Clips to a circle. The radius can be a length or percentage; the center position defaults to 50% 50%.
- ellipse(rx ry at x y) — Like circle but with separate horizontal and vertical radii. Useful for oval hero section decorations.
- inset(top right bottom left round radius) — A rectangular clip inset from the element's edges. The optional
roundkeyword adds corner rounding to the inset rectangle. - path() — An SVG path string for completely arbitrary shapes including curves, arcs, and complex paths.
Polygon Coordinate System
Polygon coordinates are measured from the top-left corner of the element. Using percentages (recommended) makes the shape responsive — it scales with the element. Using pixel values creates a fixed shape that does not scale. For a triangle pointing up: polygon(50% 0%, 0% 100%, 100% 100%). For a hexagon: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%).
Animating clip-path
You can animate between two polygon shapes as long as they have the same number of vertices. This creates smooth morphing transitions: transition: clip-path 0.4s ease;. Add a :hover rule with a different polygon to create interactive shape morphs. For star-to-circle effects, use the same number of points in both shapes. Combine with the CSS Animation Generator for keyframe-based clip-path morphing.
Clip-path and Accessibility
Because clip-path hides the clipped portions visually, be careful with text and interactive content. Screen readers can still read text inside a clipped element even if it is not visible. Pointer events are also disabled in clipped regions, so buttons or links outside the clip shape are not clickable. Always test clipped interactive elements across devices. For pure decorative shapes, clip-path is ideal. For content masking, consider whether a mask or overflow approach better serves your use case. Explore more CSS design tools like the Filter Playground or the Border Radius Generator.