CSS Clip Path Generator
Polygons, Circles and Insets
Drag the points and copy the CSS. Cut an element into a polygon, circle, ellipse or inset shape with draggable points that also work with touch and the arrow keys. Start from presets such as a hexagon, star or arrow, and copy clip-path in percentages. 100% client-side. Zero data stored.
CSS Clip Path Generator Tool
Cut a Clip Path
Drag a handle with a mouse or finger, or focus it and use the arrow keys (Shift for 10 percent steps). For a polygon, double-click the preview to add a point on the nearest edge, and press Delete on a focused point to remove it. The faint dashed box is the whole element before clipping.
A picked image stays in your browser. It is only used for the preview and is never uploaded.
CSS
Tailwind CSS
Tailwind has no clip-path utility, so this is an arbitrary property that works in versions 3 and 4.
Whole element
Shape
Presets
The four edges are drawn in from each side of the box. A round value of 0 leaves the corners square.
Common Use Cases
Shaped Sections
Give a hero or section an angled, chevron or trapezoid edge without an image or an SVG.
Image Masks
Crop a photo or avatar into a hexagon, circle or rounded inset and see it on your own image first.
Badges and Icons
Cut stars, arrows, diamonds and crosses for ratings, ribbons and decorative bullets.
Speech Bubbles
Add a tail to a message box or tooltip with one polygon and no extra elements.
Reveal Animations
Copy a start and an end shape with the same number of points and transition clip-path between them.
Precise Editing
Nudge points with the arrow keys or type exact percentages when a drag is too coarse.
Clip Path Syntax Reference
The Four Basic Shapes
| Shape | Example | Percentages mean |
|---|---|---|
| polygon | polygon(50% 0%, 100% 100%, 0% 100%) | x of the width, y of the height, one pair per point |
| circle | circle(50% at 50% 50%) | The radius is a share of sqrt((width squared + height squared) / 2); the center uses width and height |
| ellipse | ellipse(50% 35% at 50% 50%) | Horizontal radius of the width, vertical radius of the height |
| inset | inset(10% 20% round 16px) | Distance drawn in from the top, right, bottom and left edges, like margin shorthand |
Browser Support and the -webkit- Line
| Browser | Basic shapes with plain clip-path |
|---|---|
| Chrome and Edge | Unprefixed since version 55 (2016) |
| Firefox | Unprefixed since version 54 (2017) |
| Safari | Unprefixed since 13.1 (March 2020); older versions need -webkit-clip-path |
That is why the -webkit- line is off by default. Turn it on only if you must support Safari 13.0 or older.
Shadows get cut
A clip-path also cuts off the element's box-shadow, outline and any child that spills out. Put a shadow on a wrapper, or use filter: drop-shadow() on the parent.
Clicks follow the shape
Pointer events outside the clipped shape do not reach the element, which is usually what you want, but it can surprise you on a link or a button.
Basic shapes only
This tool writes polygon, circle, ellipse and inset. It does not write path(), shape() or url(#id) references to an SVG clipPath, and it uses the default nonzero fill rule.
Related tools
Round simple corners with the Border Radius Generator and add depth with the Box Shadow Generator.
Pro Tip: URL Parameters
Open the generator with a shape already loaded. Use ?preset= with triangle, trapezoid, diamond, pentagon, hexagon, star, arrowRight, arrowLeft, chevron, bubble or cross, or describe the shape with ?shape= plus ?p= (polygon points), ?c= (circle), ?e= (ellipse) or ?i= (inset). For example: /clip-path-generator/?preset=star or /clip-path-generator/?shape=polygon&p=50,0;100,100;0,100&ar=4:3
Polygon points are x,y percents joined by semicolons. A circle is c=radius,x,y (the radius can be closest-side or farthest-side), an ellipse is e=rx,ry,x,y and an inset is i=top,right,bottom,left,round,unit with the unit px or pct. Also ar (1:1, 4:3, 16:9 or 3:4), fill (gradient, solid or image), color (HEX without the #) and wk=1 for the -webkit- line. The Copy Link button builds the link from your current shape.
Frequently Asked Questions
Why We Built This Clip Path Generator
CSS clip-path can turn any element into a hexagon, a star or a speech bubble, but writing a polygon by hand means guessing percentages and reloading the page. We built a generator where every point is a handle you can drag with a mouse or finger, or nudge with the arrow keys, and the CSS updates as you go. Presets give you a triangle, hexagon, star, arrow, chevron or message bubble in one click.
The output uses percentages, so the shape scales with the element, and it tells you honestly when the -webkit- line is not needed. You can preview on a gradient, a solid color or your own image, which never leaves your browser, then copy the declaration, a Tailwind class or the whole rule, and share a link that restores the shape. Everything runs in your browser - nothing you design is sent anywhere.
The Clip Path Generator is part of RJL.io's collection of free developer tools. Round corners with the Border Radius Generator, add depth with the Box Shadow Generator, and build backgrounds with our Gradient Generator.