Skip to main content
L
Loopaloo
Buy Us a Coffee
All ToolsImage ProcessingAudio ProcessingVideo ProcessingDocument & TextPDF ToolsCSV & Data AnalysisConverters & EncodersWeb ToolsMath & ScienceGames
Guides & BlogAboutContact
Buy Us a Coffee
L
Loopaloo

Free online tools for developers, designers, and content creators. Your files are processed in your browser and are never uploaded - no accounts required. A few network utilities (like What's My IP and Currency Converter) call public APIs to do their job and say so on their pages.

support@loopaloo.com

Tool Categories

  • Image Tools
  • Audio Tools
  • Video Tools
  • Document & Text
  • PDF Tools
  • CSV & Data
  • Converters
  • Web Tools
  • Math & Science
  • Games

Company

  • About Us
  • Contact
  • Blog
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer

Support

Buy Us a Coffee

© 2026 Loopaloo. All rights reserved. Built with privacy in mind.

Privacy|Terms|Disclaimer
  1. Home
  2. Web Tools
  3. CSS Clip Path Generator
Add to favorites

CSS Clip Path Generator

Build a clip-path from polygons, circles, ellipses and rounded insets, with the fill rule exposed and the value checked before it is shown

Runs locally in your browserMore web toolsJump to full guide

Initializing in your browser…

You might also like

CSS Border Radius Generator

Round corners in px or percent, circular or elliptical, and see the radius the browser will actually paint after the CSS overlap rule scales it down

Mock Data Generator

Generate fake data that is the thing it is labelled: card numbers with a real Luhn check digit, IBANs that pass ISO 7064 MOD 97-10, UUID v4 and v7 per RFC 9562, reserved e-mail and IP ranges, a seed so the same data comes back, and JSON, NDJSON, CSV or SQL output

CSS Animation Generator

Build a CSS keyframe animation with the timing function held to what the specification allows: named, cubic-bezier and steps easings, a preview built from the same declarations as the copied CSS, and every problem the browser would refuse named before you paste it

CSS Clip Path Generator: a worked example

Every shape the tool offers, rendered in a real browser and probed with document.elementFromPoint at eleven points, against what the tool itself says those points should be.

Probed

16 shapes x 11 points, comparing the painted pixels with the tool's own geometry
What CSS Clip Path Generator produces

Browser against tool (Y = painted, n = not)

Triangle       browser YnnYnnnY     tool YnnYnnnY
Pentagon       browser YnnnnYnnnYY  tool YnnnnYnnnYY
Hexagon        browser YnnnnYYnnYY  tool YnnnnYYnnYY
Star           browser Ynnnnnnnn    tool Ynnnnnnnn
Arrow          browser YnnnnnnYYnY  tool YnnnnnnYYnY
Rhombus        browser YnnnnYYYY    tool YnnnnYYYY
...all 16 shapes agree at every point

The pentagram, where the fill rule decides the answer:
  polygon(nonzero, ...)  centre painted
  polygon(evenodd, ...)  centre NOT painted

Points sitting exactly on an edge are excluded: there the browser
is making a device-pixel rounding decision, not a statement about the shape.

A clip path is a claim about which pixels are painted, so that is what it is checked against rather than the text of the value. Two things had to be fixed before the check could pass at all: the first paint wrote polygon() with no vertices, which is invalid and leaves the element unclipped, and the fill rule was never exposed even though it decides the answer for any shape whose edges cross. Circle, ellipse and inset are now real CSS shape functions rather than polygons approximating curves, so they stay smooth at any size.

About the CSS Clip Path Generator

Build a clip path from polygons, circles, ellipses or rounded insets, drag the points, and copy CSS that has been checked before you see it. Every shape here was rendered in a browser and probed pixel by pixel against what the tool says it should cover.

Key features

  • Sixteen shapes including real circle(), ellipse() and inset() functions rather than polygon approximations
  • The fill rule exposed, with a pentagram to show what it changes
  • Nothing written until the value is valid, because an invalid clip-path is dropped silently and the element paints unclipped
  • A shape that is always valid from the first paint, never an empty polygon()
  • Coordinates rounded once, so the preview, the point list and the CSS are the same numbers
  • Every value from a shared link range checked
  • Drag, add and remove points, with a minimum of three because fewer cannot enclose an area
  • Your own image as the background, to judge the clip against real content

How to use

  1. 1Pick a shape. Circle, ellipse and inset are real CSS shape functions; the rest are polygons.
  2. 2Drag any point to make it your own, or use Add Point and Remove to change how many there are.
  3. 3Use the inset slider to leave clear space around the shape, and the fill rule for shapes whose edges cross.
  4. 4Upload your own image to see the clip against real content.
  5. 5Copy the CSS, which carries the prefixed property first and the standard one second.

A clip path is a claim about which pixels are painted

Every other CSS generator makes a claim you can argue with. A clip path makes one you can settle: these pixels are painted and those are not. So that is what this tool is checked against. Every shape it offers is rendered in a real browser and probed with `document.elementFromPoint` at eleven points, and the answer is compared with what the tool itself believes about the same points. All sixteen shapes agree at every point that is not sitting exactly on an edge.

The first thing that had to be fixed was more basic. `polygon()` with no vertices is not a valid value: the browser drops the declaration and paints the element unclipped. The previous version filled its point list from an effect that runs after the first render, so its very first paint wrote exactly that, and the generated CSS said `clip-path: polygon();` until the effect landed. The shape is now derived from the preset rather than copied into state, so there is no moment when it is empty.

The second is that a clip path is not only polygons. CSS Masking 1 takes four basic shapes, and `circle()`, `ellipse()` and `inset()` are real functions that scale with the element rather than polygons approximating a curve with straight lines. All four are here. A `circle()` is worth understanding: its percentage radius resolves against the reference box SIZE, which CSS Shapes 1 defines as the square root of half the sum of the squared width and height, not against the width and not against the height. On a 200 by 100 box a 50 percent circle therefore does not reach the left edge.

The third is the fill rule. `polygon()` takes an optional `nonzero` or `evenodd`, and for a shape whose edges cross each other the two give different results: draw a five pointed star as a single self-crossing path and `nonzero` fills the middle while `evenodd` leaves a pentagonal hole in it. The Pentagram preset is there to show it, the control is exposed, and both were verified against what the browser actually paints at the centre point.

Smaller things that were wrong and are not now: the inset slider used `parseInt(x) || 0`, so it worked, but Reset went back to the un-inset shape while the slider still read whatever it was set to; the CSS rounded its coordinates to one decimal place while the preview and the point list used the full float, so the three disagreed by up to half a hundredth of a percent; and the dashed outline over the preview was written with percentages in an SVG `points` attribute, which is not a number there, so the attribute was rejected wholesale and the outline was never drawn at all while the console filled with errors.

Examples

  • The fill rule, made visible

    Pick Pentagram and switch between nonzero and evenodd. The centre of the star fills and empties, which is the whole difference between the two rules.

  • A real circle rather than a many-sided polygon

    Pick Circle. The value is `circle(50% at 50% 50%)`, which stays perfectly smooth at any size, where a polygon approximating it would show its facets when scaled up.

Tips & best practices

  • Circle, ellipse and inset are real shape functions, not polygons pretending to be curves, so they stay smooth at any size.
  • Switch the fill rule on the Pentagram to see the difference: nonzero fills the middle, evenodd leaves a hole.
  • Drag any point to go from a preset to a custom shape; Reset puts you back on the preset with the inset you had.
  • Percentages are measured against the element's own box, so one value works at every size the element takes.

Practical scenarios

  • Angled section dividers

    A polygon with one slanted edge cuts a diagonal across a full width section without an image or an extra element.

  • Avatar and badge shapes

    Hexagons and circles clip a photo to a shape without needing the image itself to be cut.

  • Arrow and chevron steps

    The Arrow and Chevron presets are the shapes a progress breadcrumb is usually built from.

  • Rounded cutouts

    inset() with a round value gives a rounded rectangle window, which is a clip rather than a border radius and so also clips overflowing children.

Frequently asked questions

Why did my clip path do nothing?

An invalid clip-path value is dropped by the browser and the element paints unclipped, with no error anywhere. The most common cause is a polygon with fewer than three points. This tool refuses to write a value that will not parse and says what is wrong instead.

What is the fill rule for?

It decides what happens where a shape's edges cross. Draw a five pointed star as one self-crossing path: nonzero fills the middle, evenodd leaves a pentagonal hole. For a shape whose edges never cross, the two rules give the same result.

Why is circle() different from a many-sided polygon?

A polygon is straight lines between points, so it shows its facets when the element is large. circle() is a real curve at any size. Its percentage radius also resolves against the reference box size, the square root of half the sum of the squared width and height, so on a wide box a 50 percent circle does not reach the left and right edges.

Does clip-path affect layout or clicks?

It does not change layout: the element still occupies its full box. It does affect hit testing, so the clipped-away parts stop receiving pointer events, which is usually what you want.

Do I need the -webkit- prefix?

For older Safari, yes, and it is emitted first so the standard property wins wherever both are understood. Every current browser understands the unprefixed form.

Related tools and how they differ

  • CSS Box Shadow Generator: Casts layered drop or inset shadows; use it for depth, noting that clip-path can hide shadows that fall outside the clipped area.
  • CSS Border Radius Generator: Rounds rectangular corners with px or %; use it for simple rounded boxes rather than custom polygon silhouettes.
  • CSS Button Generator: Builds complete buttons with hover and color states; use it for standard rounded-rect buttons, not clipped polygon shapes.
  • CSS Gradient Generator: Makes linear, radial, or conic fills; use it for the color inside a clipped shape, separate from the shape's outline.
  • Glassmorphism Generator: Adds frosted backdrop-filter blur; use it for translucent glass surfaces rather than hard-edged polygon clipping.
  • CSS Animation Generator: Builds @keyframes with easing; use it to animate or morph clip-path shapes over time once you have defined them here.

Private by design

This runs as client-side JavaScript. Keys, tokens, payloads, and other inputs never leave your device.