CSS Clip-Path Generator

Free toolNo sign-up
Surface:
Modepolygon
Vertices3
SurfaceBrand

About this generator

Carve arbitrary shapes on any HTML element via CSS — 21 polygon presets (triangle / trapezoid / parallelogram / rhombus / pentagon / hexagon / octagon / 5-point + 6-point stars / arrows / chevrons / message bubble / cross / rabbet / notched / double-arrow) and 4 functional modes (polygon, circle, ellipse, inset with optional border-radius).

Drag-to-edit handles in the live preview let you reshape any polygon by hand — drag a vertex to move it, double-click to remove, or use the + button in the numerical list to insert a new midpoint. Background-aware preview tests your shape against brand gradient / photo / plain / grid surfaces.

Permalink: every adjustment encodes into the URL hash. No login, no watermark, no paywall. Free and MIT-licensed.

?

Why use clip-path?

✂️
Crop without extra elements
clip-path turns any rectangular box into an arbitrary shape — no SVG masks, no positioned overlays, no extra DOM. The element's layout, click area, and box model stay rectangular while only the visible region changes.
🎨
Distinctive page design
Diagonal section dividers, hexagonal avatars, ticket-style cards, chevron call-to-actions — clip-path is how modern sites get their shape language without resorting to background images.
Animatable & interactive
Polygons of the same vertex count interpolate cleanly. Animate clip-path on hover or scroll to reveal content, build accordion masks, or create dramatic page transitions — all GPU-accelerated.
🪶
Zero asset cost
No exported SVG, no PNG mask, no extra request. The shape lives in CSS as a few percentage values, scales perfectly, and adapts to any element size.

How to use this generator

01
Pick a shape type
polygon() for arbitrary multi-point shapes, circle() / ellipse() for rounded crops, inset() for rectangular cut-ins (with optional rounded corners).
02
Tweak in the preview
For polygons, drag the violet handles directly on the preview to reshape the path. Double-click a handle to remove a vertex; click + next to a vertex in the sidebar to insert a midpoint.
03
Try a preset
Triangle, hexagon, star, chevron, message bubble, ticket — each preset is a starting point. Tweak the vertices to suit your layout, swap the preview background to test against real content.
04
Copy the CSS
The output panel keeps the latest declaration ready to copy. Paste it onto any element — clip-path works on images, divs, sections, even full-bleed hero blocks.

clip-path function reference

FunctionSignatureNote
polygon()polygon(x1 y1, x2 y2, …)Any shape from 3+ points
circle()circle(r at cx cy)Pure circle crop
ellipse()ellipse(rx ry at cx cy)Stretchable circle
inset()inset(top right bottom left round radius)Rounded-rect cut-in
path()path("M0 0 L100 0 …")SVG path data — any curve
rect()rect(top right bottom left round radius)New CSS Shapes module
xywh()xywh(x y w h round radius)Position + size shorthand
=

clip-path patterns

Polygon
/* Pentagon — 5 percentage-based vertices */
.card {
  clip-path: polygon(
    50%   0%,
    100% 38%,
    82% 100%,
    18% 100%,
    0%  38%
  );
}
Hover
/* Reveal a hidden corner on hover */
.box {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transition: clip-path 400ms ease;
}
.box:hover {
  clip-path: polygon(0 0, 100% 0, 80% 100%, 0 100%);
}
Shapes
/* Rounded inset for ticket-style cards */
.ticket {
  clip-path: inset(0 0 0 0 round 12px);
}

/* Circle avatars — no border-radius needed */
.avatar { clip-path: circle(50% at 50% 50%); }

Pro tips

01
Match vertex counts to animate
Browsers can only smoothly tween polygon() with the same number of vertices. To morph between shapes, give both states the same point count — even if some points overlap visually.
02
Mind clipped click areas
Clipped regions still receive pointer events. If you clip a button into a triangle but want clicks only inside the visible shape, also set clip-path on a positioned overlay or use SVG with proper hit-testing.
03
Use Safari's -webkit- prefix sparingly
Modern Safari (15+) supports unprefixed clip-path. The -webkit-clip-path fallback is only needed for very old iOS — most generators (including this one) emit both for safety.
04
Avoid clipping focus outlines
Clipping the focus ring on form controls or links breaks accessibility. Don't apply clip-path to focusable elements — clip a wrapper or background layer instead.
?

Frequently asked questions

01

Why use clip-path instead of border-radius or SVG?

border-radius is limited to elliptical corners — anything more complex (triangle, hexagon, star) can't be done. SVG handles arbitrary shapes but requires defining the shape in SVG markup separately from the element. clip-path lets you carve arbitrary shapes directly on any HTML element via CSS — no extra markup, no separate SVG file. The clipped element keeps its event handlers, scrolling, etc.; only its visible region is restricted. Use clip-path when you want a non-rectangular shape on a DIV / IMG / VIDEO without changing your HTML.

02

Can I animate clip-path?

Yes — and it's one of the most powerful animation surfaces in modern CSS. polygon() animates correctly when source and target have the same number of vertices, in the same order. circle() and ellipse() animate trivially (just interpolate the radius / center). inset() animates side values + radius. Common patterns: hero-section reveals (start with clip-path: inset(100% 0 0 0) and animate to inset(0)), modal entrance flips, image reveal-on-scroll. For polygon morphs between DIFFERENT shapes (triangle → hexagon), both endpoints need the same vertex count — pad the smaller one with duplicate vertices at the same position.

03

Why does my polygon look wrong on a wide / narrow element?

Percentage-based clip-path coordinates are relative to the element's bounding box, NOT absolute pixels. A triangle defined as polygon(50% 0, 100% 100%, 0 100%) will look different on a 200×200 square vs a 600×200 rectangle — the aspect ratio of the box stretches the shape with it. If you want a shape that holds its proportions regardless of element size, use circle() / ellipse() with fixed-pixel radius, or constrain the element to a fixed aspect-ratio via aspect-ratio: 1 / 1.

04

How does the drag-to-edit feature work?

Each polygon vertex renders as a violet handle in the live preview. Click and drag to reposition — the clip-path updates in real time and the URL hash encodes the new position. Double-click a handle to remove that vertex (the polygon must have at least 3 vertices). The + button next to a vertex in the numerical list inserts a new midpoint between that vertex and the next one. This is the same interaction model as Bennett Feely's classic clip-path tool — just modernized with URL persistence and a richer preset library.

05

Browser support for clip-path?

Excellent. polygon() / circle() / ellipse() / inset() shipped in Chrome 55+, Safari 9.1+, Firefox 54+, Edge 79+. The legacy -webkit-clip-path prefix is still emitted in the export for older Safari versions (the difference is now 1-2 minor versions). All modern targets support clip-path without prefix. Two outliers: (1) the path() function with SVG path data is Chrome 88+ / Firefox 97+ / Safari 14.1+ — slightly newer but covered by all evergreen browsers in 2026, (2) animating between clip-path values requires the same shape function on both ends.

06

Is this free for commercial use?

Free, MIT-licensed, zero attribution required, no watermark, no signup. Use on any project — personal, client, enterprise — without permission.

See it used in real designs

Browse hand-coded collections that put this tool to work.

Search CodeFronts

Loading…