Skip to content
✂️

CSS Clip-Path Generator

Build a CSS clip-path from a polygon point map.

Runs in your browser

Updated

Points

Drag the handles on the preview, or type exact percentages below.

240px

Points in, one declaration out

The generator holds a list of vertices and nothing else. Ten presets fill it, from a four point arrow through ten and twelve point stars to a cross and a blob, and the right hand box shows a blue square with one circular handle per vertex. Output is always a single line: clip-path: polygon( followed by each pair as x% y%, comma separated and closed. The preview applies the same value live, and the Size slider from 120 to 360 pixels, default 240, changes only the preview.

A worked example

On load the Hexagon preset is selected and the list holds 25 0, 75 0, 100 50, 75 100, 25 100 and 0 50, so the box prints clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); hand edits leave the menu reading Hexagon. Pressing Point once appends a seventh vertex at 71.8 and 22.6, placed by sweeping around the centre.

Editing by handle or by number

Handles follow the pointer in tenths of a percent and are clamped inside the box, so a shape can never bulge past an edge. Each vertex also carries two number fields stepping by 0.1; typing updates the declaration without repainting the handle row, which keeps text selection alive while you enter exact values.

Where it stops

  • Polygon only. No circle, ellipse, inset or path function is emitted, so rounded cutouts need a different tool.
  • The output carries no vendor prefix and ships no width, height or background rules.
  • The menu never switches to Custom when you edit coordinates, so a hand-tuned shape still shows its original preset name.
  • Twenty vertices is the ceiling and three is the floor, enforced by the two buttons.
  • Percentages run relative to the element box, so the same declaration stretches when the element is not square.

Questions people ask

Why does my shape look skewed in production

The preview is square. On a wide element the same percentages sit further apart on one axis, so recheck against the real box.

Can I animate between two shapes

The tool prints a static value, and matching vertex counts between the two states is your job.

What complements a clipped element

Round the survivors in the Border Radius Generator, tilt them with the CSS Transform Generator, and finish in the Box Shadow Generator.