Developer Tools
CSS Clip-Path Generator
Create CSS clip-path shapes visually — triangles, hexagons, stars, arrows, speech bubbles and more — drag points to customize and copy the polygon() CSS.
How to use
- 1Choose a starting shape.
- 2Drag the handles to reshape; double-click to add a point, right-click to remove one.
- 3Copy the clip-path CSS.
Frequently asked questions
Is clip-path supported everywhere?
Yes — all modern browsers support clip-path with polygon(), circle(), ellipse() and inset().
Does clipping affect layout?
No — the element keeps its full box; only the visible and clickable area changes.
Can I animate clip-path?
Yes, between polygons with the same number of points.
Clipping hides the pixels, not the box
clip-path only changes what's painted and clickable — the element keeps its full width, height and position in the page's layout, so siblings don't reflow around the new shape the way they would with a real crop or a narrower container. That makes it safe to apply to a card or image without triggering a layout shift, but it also means a clipped element's invisible corners still occupy space and can still overlap neighboring content.
Worked example: the hexagon preset's actual CSS
Selecting Hexagon loads six points — [25,0], [75,0], [100,50], [75,100], [25,100], [0,50] — which the tool renders as: .shape { clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); } Because every coordinate is a percentage of the element's own box rather than a fixed pixel value, the same polygon() reshapes correctly whether the element is 80px or 800px wide — unlike an SVG clip path traced at one fixed size.
Dragging, adding and removing points
With a polygon shape selected, each vertex is a draggable handle: drag to reposition, double-click near an edge to insert a new point next to the closest existing one, or right-click a handle to delete it (the editor refuses to go below 3 points, since a polygon needs at least a triangle). Circle, ellipse and the rounded-inset preset use CSS's circle(), ellipse() and inset() functions instead of polygon(), so they don't expose draggable points — you adjust those with the generated CSS directly.
Animating between shapes only works if the point count matches
clip-path values can transition smoothly in CSS, but only between two polygon() values with the same number of points in the same order — morphing a 6-point hexagon into a 10-point star will just snap instantly instead of tweening, because the browser has no correspondence to interpolate between mismatched vertex lists. If you need an animated shape change, start from one preset and add or remove points by hand until both states share a count, rather than switching presets mid-animation.
Why an odd-looking star needs more points than you'd guess
A 5-point star preset isn't a 5-vertex polygon — it needs 10 points, alternating between the five outer tips and five inner concave corners, because polygon() only draws straight lines between consecutive points and has no concept of a 'star' primitive. That's also why a star looks sharp and symmetric only when the inner points sit at a consistent radius from center; dragging one inner point outward slightly breaks the symmetry immediately and visibly, since each point is independent with no constraint tying it to the others.
Clip-path and pointer events on the clipped-away area
Because the element's box is unchanged, the invisible region outside the clip path still exists in the DOM at its original size — but modern browsers do exclude that clipped-away area from receiving clicks and hover, so a clipped button or card is only clickable where it's actually visible, not across its full rectangular box. This is worth checking manually in the browser rather than assuming it from the CSS spec, since clip-path's interaction with pointer-events has historically had inconsistent edge cases across older browser versions.
Related tools
- Online HTML, CSS & JS Editor (Live Preview)
Write HTML, CSS and JavaScript and see the result instantly — live preview, console, templates, shareable links and one-click HTML download. Like CodePen, with nothing to sign up for.
- Code Beautifier (HTML, CSS, JavaScript)
Beautify messy or minified HTML, CSS and JavaScript into clean, consistently indented code you can read and edit.
- CSS & HTML Minifier
Minify CSS or HTML to shrink file size — strips comments and whitespace and shows how many bytes you saved.
- CSS to Tailwind Converter
Convert plain CSS declarations or rules into Tailwind CSS utility classes — spacing, flexbox, grid, typography, colors, borders and more, with arbitrary values where needed.
- JWT Decoder
Decode a JSON Web Token to read its header and payload, check expiry times, and verify HS256/384/512 signatures with your secret.
- API Tester (Online REST Client)
Send HTTP requests from your browser — any method, query params, headers, JSON or form body, bearer/basic/API-key auth — and inspect status, timing, headers and pretty-printed JSON. Export as cURL, JavaScript or Python.