CSS clip-path generator

This CSS clip-path generator cuts an element to a shape: pick a polygon, circle, ellipse or inset preset or drag the points, and copy the clip-path CSS or Tailwind class from the live preview.

Clip-path cuts an element to a shape: pick a preset or drag the points below, and copy the clip-path CSS (polygon, circle, ellipse or inset) for any div or image. Every change updates the live preview before you copy the CSS or the Tailwind class.

clip-path: polygon(50% 0%, 100% 100%, 0% 100%);

Point 1
Point 2
Point 3

CSS

clip-path: polygon(50% 0%, 100% 100%, 0% 100%);

Tailwind class

[clip-path:polygon(50%_0%,100%_100%,0%_100%)]

How clip-path polygon() works

polygon() takes a list of percentage coordinates measured from the top-left corner of the element, given as x then y. The browser joins the points in order and hides everything outside the resulting outline. For example, clip-path: polygon(50% 0%, 100% 100%, 0% 100%) makes a triangle: the apex sits at the top centre, then the bottom-right and bottom-left corners. Add more pairs for hexagons, stars and arrows, and keep the points in a sensible order so the edges do not cross.

For a dedicated arrow and tooltip builder that emits the same clip-path values, try the CSS triangle generator.

Clip-path shapes cheat sheet

Each preset in the generator maps to one of these CSS values. The table is built from the same preset list, so the shape you pick and the CSS you copy always match.

ShapeCSS value
Trianglepolygon(50% 0%, 100% 100%, 0% 100%)
Trapezoidpolygon(20% 0%, 80% 0%, 100% 100%, 0% 100%)
Parallelogrampolygon(25% 0%, 100% 0%, 75% 100%, 0% 100%)
Rhombuspolygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)
Pentagonpolygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)
Hexagonpolygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%)
Octagonpolygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)
Starpolygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)
Arrow rightpolygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)
Chevronpolygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%)
Message bubblepolygon(0% 0%, 100% 0%, 100% 75%, 75% 75%, 75% 100%, 50% 75%, 0% 75%)
Circlecircle(50% at 50% 50%)
Ellipseellipse(25% 40% at 50% 50%)
Insetinset(10% 10% 10% 10% round 12px)

Browser support

clip-path is supported in all current browsers, including Chrome, Edge, Firefox and Safari. The generator keeps the -webkit- prefix for older Safari releases, clip-path does not affect layout, and clipped areas do not receive clicks. That makes it safe for decorative crops on images and badges; for soft section edges use the SVG wave generator, and for rounded corners use the border radius generator.

Frequently asked questions

How do I make a triangle with clip-path?

Use polygon() with three points at the top centre and the two bottom corners: clip-path: polygon(50% 0%, 100% 100%, 0% 100%). The first pair is the apex, then the bottom-right and bottom-left points, so the element becomes a triangle pointing up. Move the first point to 0% 0% for a right-angled triangle along the top edge.

Can I animate clip-path?

Yes. Animate between two polygons only when both have the same number of points, then add transition: clip-path 0.3s ease or an @keyframes rule with matching point counts. Circle, ellipse and inset values also animate when their shape types match, and the clip-path generator lets you copy the value straight into your keyframes.

Why does my box-shadow disappear with clip-path?

clip-path clips everything the element paints, including its box-shadow, so any shadow outside the new shape is cut away. Put the shadow on a parent wrapper and clip the child, or use filter: drop-shadow on the parent when you want the shadow to follow the clipped outline instead of the original box.

Does clip-path work in Tailwind?

Yes. Tailwind has no built-in clip-path utility, so use an arbitrary value such as [clip-path:polygon(50%_0%,100%_100%,0%_100%)] and replace spaces with underscores. The copy button in the generator gives you the exact class ready to paste into your markup.

More CSS generators

Color tools

Image tools

Image & SVG tools

Typography & units

More free tools

All free tools