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. All processing happens entirely in your browser - your files never leave your device. No uploads, no accounts, complete privacy.

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

Create custom CSS clip-path shapes visually. Drag points to customize polygons, circles, and complex shapes.

Draw custom CSS clip-path shapes by dragging polygon points on a visual canvas. Supports polygon, circle, ellipse, and inset shapes with live preview and ready-to-copy CSS.

Runs locally in your browserMore web toolsJump to full guide

Initializing in your browser…

You might also like

CSS Border Radius Generator

Create custom border radius with individual corner control, linked/unlinked mode, px/% units, interactive corner sliders on preview, and 12 shape presets

CSS Animation Generator

Create custom CSS keyframe animations visually. Add keyframes, adjust timing, and preview animations in real-time.

CSS Gradient Generator

Create stunning CSS gradients with linear/radial/conic types, angle control, position control, multiple color stops, 11 presets, and reverse/randomize features

CSS Clip Path Generator: a worked example

A section needs a diamond-shaped image mask and you do not want to ship a PNG mask or fight SVG.

Shape

Diamond (4-point polygon), handles at the edge midpoints
CSS Clip Path Generator produces

CSS

clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);

Each coordinate pair is a vertex as a percentage of the element's box, traced clockwise, so those four midpoints carve a diamond. `clip-path` clips the rendered element directly (no extra assets, fully responsive, and animatable), which an exported image mask can never be. Drag a handle and the polygon points update live.

About the CSS Clip Path Generator

Draw custom CSS clip-path shapes by dragging polygon points on a visual canvas. Supports polygon, circle, ellipse, and inset shapes with live preview and ready-to-copy CSS.

Key features

  • Polygon with draggable vertices
  • Circle, ellipse, and inset presets
  • Live preview with a sample image
  • Coordinate display for precision
  • Copy-ready CSS output

How to use

  1. 1Choose a shape type: polygon, circle, ellipse, or inset.
  2. 2Drag the handles to define your shape.
  3. 3Preview the clipping on a sample element.
  4. 4Copy the clip-path CSS.

How it works

This generator outputs the CSS `clip-path: polygon(...)` function exclusively - every shape, even the Pentagon, Hexagon, Octagon and Star presets, is emitted as a list of `x% y%` vertex pairs rounded to one decimal place, with a duplicate `-webkit-clip-path` line for older WebKit. It ships 12 presets: Triangle, Rectangle, Pentagon, Hexagon, Octagon, Star, Arrow, Heart, Chevron, Parallelogram, Rhombus and Cross. The regular polygons (pentagon/hexagon/octagon) are computed trigonometrically around a center at 50%,50% with a 50% radius and a -90° start angle so the first vertex sits at the top; the Star preset is built from alternating outer and inner radii of 50 and 20 across ten points. Because the coordinates are percentages of the element's own reference box, the resulting clip-path is inherently responsive - the same `polygon()` reshapes as the element resizes rather than being pinned to fixed pixels.

The preview is a square canvas with a checkerboard backdrop where each vertex appears as a draggable control point; dragging clamps every coordinate to the 0-100% range so points can't leave the box, and a dashed blue SVG polygon outline (with `vectorEffect="non-scaling-stroke"`) traces the current shape. You can add vertices - a new point is inserted at the midpoint between the last and first existing points - up to a hard cap of 20, and remove them down to a minimum of 3 (the limits below which a polygon is invalid). A live Points list shows every coordinate, and the Inset slider (0-40%) shrinks the whole shape toward center by remapping each point through `x * (100 - 2*inset)/100 + inset`. Both mouse and touch handlers are wired, so the drag editing works on phones as well as desktop.

You can upload your own image (loaded via `URL.createObjectURL`, so it never leaves the browser) to preview how the clip will mask real content instead of the default placeholder. Note that the tool clips a polygon only: there is no `circle()`, `ellipse()`, or `inset()` output, and despite a `borderRadius` value carried in the shareable URL state, rounded/curved edges are not applied to the generated CSS - the result is always straight-edged polygon segments. The full configuration is encoded in the URL via the Share button so a specific shape and inset can be linked or bookmarked, and the Copy button writes the generated rule (wrapped in a `.clipped-element` selector) to the clipboard.

Frequently asked questions

Does clip-path work in all browsers?

Polygon, circle, and ellipse clip-paths are well-supported in all modern browsers including Chrome, Firefox, Safari, and Edge.

Does clip-path affect the element's layout?

No. The element occupies the same space in the layout, only its visible area changes.

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.