Skip to content

CSS Clip-path Generator: Polygon Shape Maker

Create CSS clip-path shapes: triangles, hexagons, stars, arrows, chevrons and more. Drag the polygon points to customize any shape and copy the clip-path CSS.

Drag the round handles to move polygon points. Use the arrow keys on a focused handle for 1% steps.

Shapes

CSS code

How to use the clip-path generator

  1. Pick a shape: triangle, trapezoid, rhombus, pentagon, hexagon, octagon, star, cross, arrows, chevron, message bubble and more.
  2. Drag the round handles to move each point. On a focused handle, the arrow keys move it by 1% (hold Shift for 10%).
  3. Toggle Show the unclipped area to see which parts of the element are hidden.
  4. Copy the clip-path declaration and add it to any element: an image, a card, a section background.

clip-path shape functions

  • polygon() takes a list of points as x and y percentages of the element's box. Any straight-edged shape is possible.
  • circle(50% at 50% 50%) and ellipse() make round masks.
  • inset(10% round 16px) trims the edges and can round the corners.

Because the points are percentages, the shape scales with the element. Everything outside the path is invisible and does not receive clicks.

Tips

  • Slanted sections: polygon(0 0, 100% 0, 100% 85%, 0 100%) gives a hero or section an angled bottom edge.
  • Animate shapes: transitions work between two polygons with the same number of points.
  • Clipped elements lose their outer box-shadow. Use filter: drop-shadow() on a parent element instead.
  • Make sure important content, such as text or a focus ring, is not clipped away.

For simple arrows and tooltip pointers, try the CSS triangle generator; for rounded organic shapes, use the border radius generator.

More CSS tools