CSS & Design

CSS Clip-path Generator


Visually create CSS clip-path shapes, drag vertices to build custom polygons, and copy the code, free and entirely in your browser.

Pick a shape, then drag the dots on the preview to reshape it.

Double-click a dot to delete it (minimum 3). Click empty space in the preview to insert a point.

Includes the -webkit-clip-path prefix for older Safari and Chrome.

What is the CSS Clip-path Generator?

The CSS Clip-path Generator is a free visual tool that builds the CSS clip-path property for you. You pick a preset shape — triangle, hexagon, star, arrow, chevron, message bubble, and more — or drag vertices directly on a live preview to sculpt a custom polygon, then copy the exact CSS you need. The clip-path property clips an element to a defined region so only the part inside the shape stays visible, letting you cut images, cards, and sections into non-rectangular forms without editing any graphics.

Everything runs client-side in your browser, so nothing you draw is uploaded or stored. You can drop in your own image to see how a shape frames real content, and the file never leaves your device.

How to use the clip-path generator

  1. Click a preset shape to load it instantly onto the preview, from simple triangles and trapezoids to a 10-point star or a speech-bubble message shape.
  2. For polygons, drag the dots on the preview to move each vertex, and watch the clip and the generated code update in real time.
  3. Press Add point to insert a new vertex, click empty space to drop one on the nearest edge, or double-click a dot to delete it (minimum three).
  4. Choose circle, ellipse, or inset to switch to radius and edge sliders instead of draggable vertices.
  5. Optionally load the sample photo or upload your own image to judge the shape on real content, then press Copy CSS to grab the declaration with its -webkit-clip-path fallback.

What is the CSS clip-path property?

The clip-path property defines a clipping region using a basic shape function, and anything outside that region is hidden. The most flexible function is polygon(), written as a list of x y coordinate pairs in percentages, for example clip-path: polygon(50% 0%, 0% 100%, 100% 100%) for a triangle. The browser connects the points in order and clips to that outline.

Beyond polygons you can use circle() and ellipse() with a radius and an at position, or inset() to trim the four edges inward with optional rounded corners. Because the clip is applied at render time, the underlying element keeps its real box for layout, and only its visible pixels change — which is why hover transitions between two clip-paths animate so smoothly.

Clip-path versus other ways to shape elements

Reach for clip-path when you want to cut an element into a distinct geometric shape while keeping its content sharp. For a soft translucent panel you would instead build a frosted look with the Glassmorphism Generator, and for a colorful fill behind a clipped shape you would define a blend with the CSS Gradient Generator. If you only need to recolor or blur pixels rather than cut them, the CSS Filter Generator is the better fit. One nuance worth remembering: a clipped element casts no normal box-shadow around its new outline, so for depth on a clipped shape you often layer a wrapper styled with the CSS Box Shadow Generator or switch to a drop-shadow filter that follows the clipped edge.

Why use this clip-path generator

  • Drag-to-edit vertices: Move, add, and delete polygon points directly on a live preview instead of guessing coordinates.
  • 14+ presets: Triangle, trapezoid, rhomboid, rhombus, pentagon, hexagon, star, arrow, chevron, message, close, frame, circle, ellipse, and inset.
  • All shape functions: Build polygon(), circle(), ellipse(), and inset() with rounded corners.
  • Bring your own image: Preview the clip on a sample photo or your uploaded picture, processed entirely in-browser.
  • Clean output: Copy the clip-path value with a matching -webkit-clip-path line for wider support.
  • Private and free: No sign-up, no server calls, no data saved.

Tips for reliable clip-path shapes

Keep your coordinates in percentages so the shape scales with the element on any screen, and close visual gaps by making sure the first and last points meet the edges you intend. When you animate between two shapes on hover, give both polygon() values the same number of points so the browser can interpolate them smoothly. If you are matching a clipped section to a brand color or want a background tint that reads well behind the cut, sample the exact hue first with the HTML Color Picker before setting the fill. Finally, test complex polygons against real text, since aggressive clipping near the edges can crop descenders or padding you did not expect.

Frequently Asked Questions

What does the CSS clip-path property do?

It clips an element to a defined shape so only the region inside that shape is visible and everything outside is hidden. You describe the region with a function like polygon, circle, ellipse, or inset, and the browser renders only the pixels within it while the element keeps its normal box for layout.

How do I make a custom shape with clip-path?

Use the polygon function with a list of x y coordinate pairs in percentages, such as polygon(50% 0%, 0% 100%, 100% 100%). Each pair is a vertex, and the browser connects them in order. In this tool you can drag the dots on the preview to place vertices visually instead of typing coordinates.

Why does the tool output a -webkit-clip-path line?

The -webkit-clip-path prefix is a fallback for older Safari and some legacy Chrome versions that shipped clip-path before the standard was finalized. Modern browsers use the unprefixed clip-path property, but including both keeps your CSS compatible with a wider range of devices.

Can I preview clip-path on my own image?

Yes. Choose the upload option and pick an image, and the clip-path applies to it live in the preview. The file is read locally in your browser with JavaScript and is never uploaded or stored on any server.

Does clip-path affect the element's layout box?

No. Clipping only changes which pixels are painted, not the size or position the element occupies in the document flow. Surrounding elements still lay out against the original rectangular box, so a clipped shape does not reflow the page around its new outline.

Do CSS clip-path shapes work in all browsers?

Yes. The clip-path property with basic shapes is supported in every modern browser, including Chrome, Firefox, Safari, and Edge, so the CSS you copy works reliably. The added -webkit-clip-path fallback extends support to a few older builds.