CSS Clip Path Generator

Create CSS clip-path shapes with presets or drag custom polygon points and copy the CSS code

Safe conversion with no data sent to server

Last updated: March 2026

Preview
CSS
clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
Shape Presets
Background Color
#3b82f6
Points
Point 1:50% 0%
Point 2:100% 100%
Point 3:0% 100%

What is CSS clip-path?

The CSS clip-path property creates a clipping region that defines which part of an element is visible. Anything outside the clipping region is hidden, effectively cropping the element into a custom shape. It supports several shape functions: circle() for circular masks, ellipse() for oval shapes, polygon() for multi-point shapes like triangles and hexagons, and path() for arbitrary SVG path shapes.

Unlike border-radius which only rounds corners, or overflow: hidden which only clips to rectangles, clip-path can create any arbitrary geometric shape β€” triangles, pentagons, stars, arrows, and complex custom polygons defined by percentage-based coordinate points.

Clip-Path Shape Functions

The polygon() function accepts a list of x,y coordinate pairs in percentage units: polygon(50% 0%, 0% 100%, 100% 100%) creates a triangle. circle(50%) creates a circle clipped to the element. ellipse(50% 40% at 50% 50%) creates an ellipse. inset(10px 20px) creates a rectangular inset clip. Each coordinate is relative to the element's bounding box, so 0% 0% is top-left and 100% 100% is bottom-right. This generator lets you drag handles to visually position polygon points and see the CSS output in real time.

Creative Uses of clip-path

Clip-path enables design patterns that were previously only achievable with SVG or background images. Use polygon() to create diagonal section cuts on landing pages β€” the classic angled hero section. Use circle() to mask images into circles for profile photos without the border-radius approach. Use custom polygons to create arrow-shaped navigation tabs, hexagonal image galleries, or chevron-shaped dividers between page sections. Combined with transitions, clip-path enables stunning shape-morphing reveal animations.

clip-path vs SVG Masking

CSS clip-path and SVG masking both create shaped elements, but serve different purposes. Clip-path is simpler and better for geometric shapes defined by CSS functions β€” it is applied directly on HTML elements with a single CSS property. SVG masking (<clipPath> element) supports more complex paths, bitmap masks, and gradient masks that clip-path cannot achieve. For standard polygon shapes and geometric designs, CSS clip-path is the most convenient approach. For complex, irregular shapes, SVG masking provides more power.

Common Use Cases

  • Diagonal section dividers on landing pages using an angled polygon clip
  • Circular image masks for profile photos and avatar displays
  • Hexagonal image grids for portfolio galleries with a geometric layout
  • Arrow-shaped navigation tabs or breadcrumb indicators
  • Animated shape morphing reveals on scroll or hover using CSS transitions
  • Decorative hero section backgrounds with non-rectangular shapes

FAQ

Is clip-path supported in all browsers?

Yes. The clip-path property with polygon(), circle(), and ellipse() is supported in all modern browsers. The path() value for complex SVG paths has slightly newer support but is also broadly available. No vendor prefixes are needed for basic shapes in modern browsers.

Can I animate clip-path?

Yes. CSS transitions and animations can smoothly interpolate between two polygon() clip-path values. For smooth morphing, both the initial and final polygons must have the same number of points. CSS transitions handle the interpolation automatically: transition: clip-path 0.3s ease.

Does clip-path affect mouse events and click areas?

Yes. Elements clipped by clip-path will not register mouse events on the clipped (invisible) area by default. Clicks and hovers only work within the visible clipped region. If you need click events on the full element regardless of clip shape, use pointer-events: all or apply clip-path to a visual overlay rather than the interactive element.