UTILS.
Private by default
◇

CSS clip-path Generator

Clip an element into common shapes and copy the clip-path CSS.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →

Try a worked example

Example

Choose the hexagon shape to get clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);. Each pair is an x and y position inside the element, so the shape stretches with the element's width and height.

Keep in mind

Clipping hides part of the element but keeps its layout box, so neighbors do not move and the hidden corners stop receiving clicks. Borders and box shadows are clipped too; put a drop-shadow filter on a wrapper if you need a shadow.

About this tool

CSS clip-path Generator cuts a preview box into one of eight ready-made shapes and gives you the matching CSS. The shapes are triangle, rhombus, pentagon, hexagon, star, circle, ellipse and an inset rectangle with rounded corners. The preview is a 160 by 160 pixel gradient square, so you can see the outline straight away.

The output is a single declaration, for example clip-path: polygon(50% 0%, 0% 100%, 100% 100%); that you copy with one click and paste into any rule. The polygon shapes list their corner points as x y percentages of the element's own width and height, so the shape scales with the element instead of being tied to pixels. The circle is circle(50% at 50% 50%), the ellipse is ellipse(50% 35% at 50% 50%) and the inset is inset(10% 10% 10% 10% round 10px).

The shapes are fixed presets. There are no draggable points and no size controls, so treat the output as a starting point and edit the percentages by hand if you need a different outline; polygon() accepts as many x y pairs as you like, and the preview here will not follow your manual edits. Clipping changes only what is painted: the element keeps its full rectangular box for layout, and any border or box-shadow that falls outside the shape is cut away with everything else. Nothing you do on this page is uploaded.

Frequently asked questions

How do polygon clip-paths work?
Each point is an x y percentage pair relative to the box; the browser connects them in order and shows only the area inside the outline.
Do all browsers support clip-path?
Polygon, circle, ellipse and inset shapes are supported in every modern browser, so the generated CSS works without prefixes.
Can I move the points or draw my own shape?
Not in this tool. The eight shapes are presets, so copy the CSS and edit the percentages in your own stylesheet. Add more x y pairs inside polygon() for extra corners.
Does clipping change the space an element takes up?
No. The element keeps its normal rectangular box in the layout, so neighbouring content does not move into the cut-away corners. Only the painted area is clipped.

More tools