CSS Clip-Path Generator
Clip elements into shapes — polygon presets and editable points, circle, ellipse and inset, with live preview and copy-ready CSS.
clip-path cuts an element’s rendering into a shape: everything outside the shape is simply not painted, and — unlike a transparent PNG mask — the clipped-away area also stops receiving clicks and hovers, so the visible shape is the interactive shape. The most flexible form is the polygon, a list of x/y points in percent of the element’s box joined by straight lines. The worked example is the triangle: clip-path: polygon(50% 0%, 100% 100%, 0% 100%) — a point at the top-centre, then the two bottom corners. Percentages make the shape resolution-independent: the same declaration clips a thumbnail and a full-width hero identically. One thing clip-path does not do is change layout — the element still occupies its original rectangle in the page flow; only its painting (and hit area) is cut.
Everything runs in your browser; your values are never uploaded, stored or put into a link. The preview block is clipped with the exact declaration shown above.
Quick answers
How do I make a triangle with CSS clip-path?
clip-path: polygon(50% 0%, 100% 100%, 0% 100%) — top-centre, bottom-right, bottom-left. The element’s background fills the triangle; the rest of the box is clipped away and ignores clicks.
Flip it upside down with polygon(0% 0%, 100% 0%, 50% 100%), or make a right-pointing arrow from the chevron preset in this generator.
How do I clip an element into a circle?
clip-path: circle(50% at 50% 50%) — a circle whose radius is 50% centred in the box. On a non-square element the percentage radius follows the CSS reference-box formula, so use a square box for a true circle.
For an oval, use ellipse() with separate radii, for example ellipse(50% 35% at 50% 50%). Both are in the shape-type dropdown above.
How to use
- Pick a shape type: Polygon for free-form points, or Circle, Ellipse and Inset for the parametric shapes.
- For a polygon, start from a preset button (triangle, diamond, pentagon, hexagon, star, chevron) or type your own points.
- Edit the points list as “x y” pairs in percent of the box — one pair per line — or drag the circle / ellipse / inset sliders.
- Copy the generated clip-path declaration; the preview block is clipped with exactly that value.
About this tool
The other three shapes are parametric shortcuts. circle(50% at 50% 50%) clips to a circle of the given radius around a centre point; ellipse() takes separate horizontal and vertical radii; inset(10% 10% 10% 10%) cuts a fixed margin from each edge, producing a smaller rectangle (optionally with rounded corners via its round keyword, which this generator leaves off so the output stays minimal). Typical production uses: angled section dividers and chevron buttons (polygon), avatar and spotlight masks (circle), image windows (inset), star ratings and badge bursts (the star preset). Polygons with the same number of points can even be animated between — a morphing hover effect — as long as both shapes have identical vertex counts. If a browser ever fails to parse the value, the element simply renders unclipped, so clip-path degrades gracefully as a visual enhancement.
Frequently asked questions
What is the difference between clip-path and border-radius?
border-radius can only round corners with circular or elliptical arcs. clip-path cuts arbitrary shapes — triangles, stars, notches, diagonal edges — and also removes the clipped area from hit-testing, so buttons shaped with clip-path are only clickable where they are visible. Radius is simpler; clip-path is far more general.
Does the clipped-away area still take up space?
Yes. clip-path changes painting, not layout: the element keeps its full rectangular box in the flow, and neighbouring elements position against that rectangle. The invisible parts do not receive pointer events, but they still occupy layout space — plan the box size accordingly.
How do I read the polygon point format?
Each point is “x% y%” measured from the element’s top-left corner: 0% 0% is top-left, 100% 0% top-right, 100% 100% bottom-right. Points connect in the order listed and the shape closes back to the first point. In this generator each line of the text box is one point, and preset buttons fill the box for you.
Can clip-path shapes be animated?
Yes, between compatible shapes: two polygons with the same number of points interpolate point by point, and circle/ellipse/inset interpolate their numbers. A polygon cannot morph into a circle, and changing the vertex count breaks the animation — keep the count identical across the states you animate between.
First time embedding? Read the step-by-step guide →
More free tools
CSS Box Shadow Generator
Design box shadows visually — offsets, blur, spread, colour, opacity and inset — and copy the exact box-shadow CSS.
CSS Border Radius Generator
Round corners visually — per-corner sliders, px or %, and separate vertical radii for elliptical corners and blob shapes.
SVG to PNG Converter
Turn SVG markup or an .svg file into a PNG or JPG at the size you choose.
UUID Generator
Generate random v4 UUIDs in bulk.
JSON Formatter & Validator
Format, minify and validate JSON in one click.
What Is My IP
See your public IP address instantly. No sign-up, nothing stored.