Clip-path Generator

Generates a CSS clip-path from presets such as hexagon, star, triangle, arrow, circle, ellipse and inset, or from your own polygon points. A preview shows the shape.

Use the tool

Why this tool exists

The clip-path property lets you cut an element into a shape without exporting an image: an angled hero section, a hexagonal avatar, an arrow-shaped button. The polygon syntax is just a list of percentage pairs, but working out the numbers for a star or chevron by hand takes many refreshes.

Pick a preset and the code appears, ready to copy. To customise it, enter your own points in the optional box, one x and y pair per line in percent or pixels, and the preset is overridden. At least three points are required, and badly formed lines produce an error that points at the culprit. The shape is drawn over a gradient so you can see its edges. It all runs in your browser.

How to use it

  1. Choose a preset shape from the list.
  2. Optionally enter custom polygon points, one "x% y%" pair per line.
  3. Check the preview.
  4. Copy the clip-path declaration.

Frequently asked questions

What presets are included?

Triangle, trapezoid, parallelogram, rhombus, pentagon, hexagon, octagon, star, cross, arrow, message bubble and chevron as polygons, plus circle, ellipse and inset with rounded corners.

How do I enter my own polygon?

Type one point per line as two numbers, each with a percent or px unit, such as "50% 0%". You need at least three points. Typing anything in this box overrides the preset.

Does clip-path remove the clipped area from layout?

No. The element still takes up its full box for layout and hit testing is limited to the visible shape. Content outside the shape is simply not painted.

Are shadows and borders clipped too?

Yes. A box-shadow or border outside the clip shape is cut off with the rest. Apply the shadow to a wrapper, or use a drop-shadow filter on a parent.