CSS Clip-Path Generator
Draw a clip-path by dragging points, round its corners and wrap text around it.
Shape
Drag the points. Click an edge to add a point there; a focused point moves with the arrow keys (Shift for 10%) and Delete removes it.
Values
| # | X (%) | Y (%) | Remove |
|---|
A circle’s radius in % is measured against √(width² + height²) ÷ √2, so 50% fills a square box exactly.
Presets
Text wrap (shape-outside)
shape-outside lets text flow around the outline of a floated element instead of its rectangular box. Here the float has the same shape as its clip-path, so the words follow the visible edge of the picture.
Percentages in the shape are measured against the element’s box, so the outline scales with the image. shape-margin keeps the text a few pixels away from the edge, and the float side decides where the image sits.
Only floats wrap like this. Give the element a width and a height (or an image with known dimensions), write border-box after the shape so it is measured like the clip-path, and let the paragraphs that follow wrap around it.
Code
Paste a clip-path to edit it
About the CSS Clip-Path Generator
Cut an element into any shape with CSS clip-path, by dragging instead of typing coordinates. Build a polygon point by point — drag the points, click an edge to add one, move the whole shape with the handle in its middle — or use a circle, ellipse or inset rectangle with draggable radius and edge handles. Start from 25 presets (triangle, trapezoid, parallelogram, rhombus, regular polygons, star, bevel, rabbet, arrows, points, chevrons, cross, close, message bubble, frame and more) and preview the shape on a sample picture or one of your own, which stays on your device.
The code comes as CSS in % (scales with the element) or px (for the element size you set), as the newer shape() function, as a Tailwind arbitrary property and as a text wrap: the same shape on a float with shape-outside, so text flows along its edge, shown live below the editor. Polygons can get rounded corners, which polygon() cannot do — the tool writes them with shape() and keeps a sharp polygon as the fallback for older browsers. You can also paste an existing clip-path to edit it.
How to use it
- Pick a preset or a shape type: Polygon, Circle, Ellipse or Inset.
- Drag the handles on the preview — or type exact values under Values. For polygons, click an edge to add a point; a focused point moves with the arrow keys and Delete removes it.
- Set the element’s width and height (used for px output and the preview’s proportions), and optionally choose Use your own picture.
- For a polygon, add Rounded corners if you like, and check the Text wrap preview, its float side and shape margin.
- Choose % or px and a format — CSS, shape(), Tailwind or Text wrap — then copy or download the code.
Examples
Preset: Triangle
clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
Preset: Triangle · shape() / Tailwind
clip-path: shape(from 50% 0%, line to 100% 100%, line to 0% 100%, close); [clip-path:polygon(50%_0%,100%_100%,0%_100%)]
Preset: Circle · units: px
clip-path: circle(176.78px at 200px 150px);
In %, the radius of circle() is measured against √(400² + 300²) ÷ √2 = 353.55px, so 50% is 176.78px.
Common uses
- Angled section dividers, slanted hero images, ribbons, tags, arrows and badge shapes.
- Avatars and thumbnails in circles, hexagons or stars without editing the images.
- Magazine-style layouts where text wraps around a cut-out photo.
- Hover effects: animate between two polygons with the same number of points.
How the basic shapes work
clip-path hides everything outside the shape; hidden parts do not receive clicks either (CSS Masking). Coordinates in % are measured against the element’s border box: polygon() takes x y pairs from the top left; ellipse(rx ry at x y) takes radii in % of the width and the height; circle(r at x y) takes one radius, whose % is of √(width² + height²) ÷ √2 so a circle stays round on non-square boxes; inset(top right bottom left round radius) cuts in from the edges like margin values and can round its corners (CSS Shapes). Percentages keep the shape when the element is resized; px values fix it to one size.
shape() and rounded corners
shape() describes an outline with drawing commands — from x y, line to, hline and vline, curve to … with …, arc to … of … and close — and is supported from Chrome and Edge 135, Firefox 148 and Safari 18.4 (MDN). Unlike polygon(), it can draw curves, so the tool uses it for Rounded corners: each corner is replaced by a curve that starts and ends where a circle of the chosen radius would touch the two edges (never past the middle of an edge), measured at the element size you set. The CSS lists the sharp polygon() first and the shape() second, so browsers that do not understand shape() keep the polygon.
Wrapping text with shape-outside
shape-outside makes the text next to a float follow a shape instead of the float’s rectangle; it accepts the same polygon(), circle(), ellipse() and inset() functions. Give the float a width and height (an image with known dimensions works), add shape-margin to keep the text away from the edge, and put the floated element before the text. By default shape-outside measures from the margin box, so the code writes border-box after the shape to match the clip-path. Rounded polygons wrap along their sharp outline.
Limitations
- Polygons use the default nonzero fill rule; a pasted polygon with evenodd is read without it.
- Pasted shape() values are read when they use straight lines (line to, hline, vline, close); curves, arcs and path() are not edited here.
- Rounded corners are calculated for the element size you set; at other sizes they scale with the shape.
- clip-path does not change the element’s layout box: the hidden parts still take up space.
Privacy
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
How do I make a triangle with clip-path?
Use clip-path: polygon(50% 0%, 100% 100%, 0% 100%); — the top middle, then the bottom right and bottom left corners. The Triangle preset writes exactly that; drag the points for other triangles.
Can clip-path polygons have rounded corners?
The CSS Shapes specification adds an optional round to polygon(), but it is not in every browser yet, while shape() — which can draw curves — works in Chrome 135, Firefox 148 and Safari 18.4 and later. Set Rounded corners and the tool writes a shape() with a curve at each corner, after a sharp polygon() fallback.
Should I use % or px?
Use % when the element can change size (responsive images, cards): the shape scales with it. Use px when the element has a fixed size and you need exact distances, such as a 24px notch.
How do I use clip-path in Tailwind CSS?
Tailwind has no clip-path utility, so use an arbitrary property such as [clip-path:polygon(50%_0%,100%_100%,0%_100%)] — commas without spaces, other spaces as underscores. It works in Tailwind v3 and v4; the Tailwind tab writes it.
Can I animate between two clip-paths?
Yes, when both are the same function with the same number of points, e.g. two polygons with six points each; transitions and keyframes then interpolate each point. Different functions or point counts switch without animating.
Is my picture uploaded?
No. A picture you choose is shown from your device only, and the page works offline once loaded.