CSS Clip-Path Generator

Create CSS clip-path shapes visually with a live preview and copy the generated CSS.

About This Tool

The CSS Clip-Path Generator is a free, browser-based visual editor that lets you create clip-path values without writing CSS by hand. Instead of guessing coordinates and refreshing your page, you pick a shape type, drag points or adjust sliders, and immediately see the clipped result on a live preview. Once the shape looks right, copy the generated CSS and paste it into your stylesheet.

The clip-path property is one of the most powerful visual tools in modern CSS. It lets you carve any HTML element into a geometric shape: circles for avatars, ellipses for badges, polygons for diagonal hero sections, arrows, stars, and any custom shape you can imagine. Combined with CSS transitions, clip-path enables smooth reveal animations and morphing effects that would otherwise require SVG or canvas.

This tool supports all four basic shape functions: circle() for round clips with adjustable radius and center position; ellipse() for oval clips with independent horizontal and vertical radii; polygon() for arbitrary shapes defined by a series of vertex points; and inset() for rectangular clips with optional rounded corners. For polygon mode, the generator includes preset shapes like triangles, pentagons, hexagons, stars, arrows, and crosses as starting points that you can further customize.

All processing happens entirely in your browser. No data is sent to any server, and there are no third-party scripts involved. The generated CSS uses standard clip-path syntax that works in every modern browser, producing clean, production-ready code you can use immediately.

How to Use

  1. Select a shape type from the dropdown: Circle, Ellipse, Polygon, or Inset.
  2. Adjust the shape using the sliders and number inputs in the controls panel. For polygon shapes, you can also drag points directly on the preview.
  3. Choose a preset shape from the gallery to start with a common shape like triangle, star, or hexagon, then customize it further.
  4. Watch the live preview update in real time as you change any setting. The preview uses a colorful gradient to clearly show the clipped area.
  5. Review the generated CSS code below the preview, then click Copy CSS (or press Ctrl+Shift+C) to copy it to your clipboard.
  6. Paste the clip-path value into your CSS rule and apply it to any element — images, divs, sections, or cards.

FAQ

What is CSS clip-path?

The CSS clip-path property lets you clip (mask) an element to a specific shape. Only the part of the element inside the shape is visible; everything outside is hidden. It supports basic shapes like circle(), ellipse(), inset(), and polygon(), as well as SVG path references.

Is clip-path supported in all browsers?

Yes. The clip-path property with basic shapes (circle, ellipse, polygon, inset) is supported in all modern browsers including Chrome, Firefox, Safari, and Edge. According to Can I Use, basic shape support exceeds 97% globally. The older clip property and the url() syntax for SVG paths have more limited support.

Can I use clip-path with images?

Absolutely. clip-path works on any HTML element, including <img> tags, <video> elements, and divs with background images. The shape clips the entire element, so you can create circular avatars, diagonal sections, or complex decorative cuts on any content.

What is the difference between clip-path and mask?

clip-path uses geometric shapes to define visible regions and produces hard edges. The CSS mask property uses an image (often a gradient) as a transparency map, allowing soft, semi-transparent transitions. Use clip-path for clean geometric cuts and mask for gradient fades and complex transparency effects.

Can I animate clip-path?

Yes. Browsers can transition and animate clip-path values as long as the source and target shapes use the same function and the same number of points (for polygon). This enables effects like reveal animations, morphing shapes, and interactive hover transitions. Use CSS transitions or @keyframes to animate the values.

Is my data sent to a server?

No. The Clip-Path Generator runs entirely in your browser. All shape editing, preview rendering, and CSS generation happen locally with JavaScript. No data leaves your device, and there are no server requests or third-party scripts.

How do polygon points work?

Polygon points are defined as percentage pairs (x% y%) separated by commas. Each pair represents a vertex of the polygon. The browser draws straight lines between consecutive points and closes the shape automatically. You can drag the points on the preview, or edit the percentage values directly in the controls panel.

Related Tools