CSS Clip Path Generator
Visual clip-path builder - polygon / circle / ellipse / inset / path, 20+ presets, custom polygon editor. Free, client-side.
- Runs in your browser
- Nothing uploaded
- Free, no sign-up
Build CSS clip-path values with 5 function types (polygon / circle / ellipse / inset / path) and 20+ presets organized by category. Edit polygon points directly for custom shapes.
CSS
HTML
How to Use CSS Clip Path Generator
- Pick a function type: polygon (arbitrary points), circle (radius + center), ellipse (rx/ry + center), inset (rectangle clipped from each side), or path (SVG path).
- Pick a preset from the dropdown or edit values directly. For polygon: each line is one point as "x, y" percentage. For path: use SVG path syntax assuming 100×100 viewBox.
- Customize the preview's width / height / background to test against your actual layout.
- Output includes
-webkit-clip-pathprefix for older WebKit browsers (still needed for Safari <14). - Copy CSS, copy HTML, or download as
clip-path.css.
Frequently Asked Questions
When should I use clip-path instead of overflow: hidden or border-radius?
Use overflow: hidden with border-radius when you only need rounded rectangles, it is cheaper and works everywhere. Reach for clip-path when the shape is not a rounded box: diagonal section dividers, arrows, hexagon avatars, or shapes you want to morph with a transition. One caution: clip-path clips painting only, the clipped element still occupies its full rectangular space in the layout.
What are the 5 clip-path function types?
polygon(x1 y1, x2 y2, …): arbitrary shape from 3+ points. circle(r at cx cy): circular clip with radius and center. ellipse(rx ry at cx cy): oval clip. inset(top right bottom left round radius): rectangle clipped from each side with optional corner radius. path(“M …”): SVG path syntax for curves and arcs.
How do I read polygon coordinates?
Each point is “x%, y%” where (0%, 0%) is top-left and (100%, 100%) is bottom-right. Points are connected in order to form the polygon, then the shape auto-closes back to the first point. Outside the polygon = clipped.
What’s inset() for?
Clips a rectangle from each side. inset(20%) trims 20% from all sides. inset(0 20% 0 0) trims only the right 20%. The optional round parameter applies border-radius to the clipped rectangle – useful for rounded card masks.
What’s path() for?
SVG path syntax for shapes that polygon can’t easily express – curves (Q/C commands), arcs (A command), or imported SVG paths. Coordinates are absolute (no percentage), assumes 100×100 viewBox. For complex hand-drawn shapes, easier to design in Figma/Illustrator and export SVG path data.
Do I need vendor prefixes?
The output includes -webkit-clip-path for Safari pre-14 and older WebKit browsers. For Chrome / Firefox / Edge / Safari 14+, the unprefixed property is enough. Including both is harmless and ensures wider compatibility.
Can I animate clip-path?
Yes – same function with same point/argument count interpolates smoothly. polygon → polygon animates if both have the same number of points. circle → circle always works. polygon → circle? No – different function types can’t morph (you’d need a polygon approximating a circle).
What about click events on clipped areas?
Elements ARE still clickable in the clipped region by default (clip-path is visual only – the element’s actual bounds still capture events). To restrict events to the visible shape, also apply pointer-events: none on the clipped area, or use shape-outside on a sibling – but neither is fully solved without scripting.
Does clip-path work on every element?
Yes – divs, images, videos, buttons, iframes. Note that scrollable content inside a clip-path may visually clip but still scroll; consider overflow: hidden on parents.
Is anything uploaded?
No. The CSS is generated entirely in your browser with JavaScript – nothing is sent to a server, logged, or stored, and the tool keeps working offline once the page has loaded.
Related Tools
CSS Animation Generator →
Generate CSS @keyframes animations - 16 presets, full duration/timing/delay/direction/fill controls, prefers-reduced-motion wrapper. Live preview.…
CSS Aspect Ratio →
Generate CSS aspect-ratio with padding-top fallback, object-fit options, 16+ presets, decimal input. Live preview.…
CSS Beautifier →
Beautify or minify CSS with proper nested @media/@keyframes/@supports handling, comment preservation, calc()/var() awareness. Free,…
CSS Border Radius Generator →
Visual CSS border-radius with elliptical mode, 6 unit types (px/%/em/rem/vw/vh), 8 shape presets, live…
CSS Columns Generator →
Generate CSS multi-column layout with column-count or column-width, gap, rule, fill, span, break-inside. Live…
CSS Cursor Generator →
Browse 34 CSS cursors organized by category, with custom URL cursor builder. Live hover…
CSS Filter Generator →
Generate CSS filter with 10 functions including drop-shadow, backdrop-filter mode, 8 preset combinations. Live…
CSS Flexbox Generator →
Visual flexbox builder with container + per-item controls (flex-grow/shrink/basis/order/align-self) and 6 layout presets. Free,…
CSS Glassmorphism Generator →
Visual frosted-glass CSS builder. 9 controls including backdrop-saturate, 6 presets, 4 background scenes to…
CSS Gradient Generator →
Visual gradient builder with 6 types (linear, radial, conic + 3 repeating). 8 presets,…
CSS Grid Generator →
Visual CSS Grid builder with grid-template-areas, auto-fit + minmax responsive tracks, per-item spans. 6…
CSS Media Query Generator →
Build @media queries: width, dark mode, reduced-motion, hover, pointer, orientation, print. Free, offline, client-side,…