CSS Clip Path Generator

Drag points to build a clip-path polygon and copy the CSS. Presets cover triangles through octagons plus a star, a chevron and a speech bubble, and every preset is generated from actual geometry rather than typed out, so a hexagon is genuinely regular. Coordinates are percentages of the element's own box, which is what keeps the shape intact when the element is resized — a pixel-based polygon that looks right on a desktop card gets cut in half on a phone. One thing worth knowing before you ship it: clip-path hides part of the element's rendering but does not change its layout box, so the clipped-away area still takes up space and still catches clicks unless you handle that separately.

clip-path shapes

FunctionWhat it does
polygon()Straight-edged shape from a point list — this tool
circle()A circle with a radius and centre
ellipse()Two radii and a centre
inset()A rectangle inset from each edge, with optional rounding
path()Full SVG path syntax, curves included

When to use it

  1. Cut a hero image into an angled or diagonal shape.
  2. Make a hexagonal avatar or badge.
  3. Build an arrow, chevron or speech-bubble container.
  4. Create a diagonal section divider without an SVG.
  5. Clip a decorative element into a custom polygon.

How to Use

  1. Pick a preset, or start dragging points.
  2. Add or remove points to change the shape.
  3. Copy the clip-path CSS.

Features

  1. Drag any point directly on the preview
  2. Geometrically generated polygon and star presets
  3. Add and remove points freely
  4. Percentage coordinates that scale with the element
  5. Minimum point count enforced so nothing vanishes
  6. Runs entirely in your browser

FAQs

Why percentages instead of pixels?

So the shape scales with the element. A polygon in pixels is calculated against a fixed size, so the same clip that looks right on a wide desktop card slices through the middle of the element on a phone. Percentages are relative to the element's own box and survive any resize.

Does clip-path change the element's layout?

No, and this surprises people. It affects only what is painted — the element still occupies its full rectangle in the layout, and the invisible clipped-away parts still receive pointer events. If a clipped element is intercepting clicks it should not, that is why.

Why do I need at least three points?

Because two points define a line, not an area. An element clipped to a degenerate path vanishes completely, which looks like a broken page rather than something you did, so the minimum is enforced.

Can I animate a clip-path?

Yes, but only smoothly between polygons with the same number of points — the browser interpolates point by point. Animating between a triangle and a hexagon jumps rather than morphs. A common trick is to give both shapes the same point count, with some points doubled up.

What about curves?

polygon() is straight lines only. For curves, clip-path also accepts circle(), ellipse() and a path() with Bézier commands — path() gives full curve control but is far less readable and less widely supported than polygon.

Is my work uploaded?

No. Everything is computed in your browser.

Technical Details

Points are stored and emitted as percentages of the element's own box rather than pixels, which is what makes a clipped shape survive being resized — a pixel-based polygon that looks right on a desktop card is cut in half on a phone. The preset polygons are generated trigonometrically rather than typed out, so a hexagon is genuinely regular instead of approximately so: vertices are placed at even angular intervals with the first rotated to sit at the top, which is how people expect a polygon to be oriented. The star alternates between the outer radius and an inner one at a fixed ratio, which is the only parameter that separates a star from a spiky blob. Dragging updates a single point by index rather than rebuilding the list, so the polygon's winding order is preserved — reordering points silently changes which region is inside the shape and produces a self-intersecting mess. Three points is enforced as the minimum because fewer cannot enclose an area at all, and an element clipped to a degenerate path disappears completely, which looks like a broken page rather than a user error. Worth knowing when using this: clip-path cuts the element's rendering but not its layout box, so the clipped-away area still occupies space and still receives pointer events unless you account for it.

Web & CSS Tools

Web & CSS Tools

  • CSS Keyframes Generator
  • CSS Unit Converter
  • Layout Grid Calculator
  • Design Tokens Converter
  • SVG Sprite Builder
  • Font Subsetter and WOFF2 Converter
  • Viewport Meta Tag Generator
  • Web App Manifest Generator