CSS generators

CSS Clip-Path Generator

Draw polygon, circle, ellipse and inset clip-paths by dragging handles on a live preview, then copy the CSS, Tailwind class, Sass variable or SVG clipPath.

  • Free foreverNo trial, no paywall, no usage limits.
  • No sign-upOpen the page and start. We never ask for an email to use a tool.
  • PrivateEverything runs in your browser. Your input is never uploaded or stored on our servers.
  • Works offlineOnce the page has loaded, the tool keeps working without a connection.
Any shape made of straight edges: triangles, stars, arrows, frames.A circle with a center and one radius.An oval with separate horizontal and vertical radii.A rectangle cropped in from each edge, with optional rounded corners.
Undo (Ctrl/⌘+Z)Redo (Ctrl/⌘+Shift+Z)Randomize: surprise me with a new designReset to the starting designCopy a link that reopens this exact design

Editor

Drag the handles to shape the clip. Everything is keyboard accessible: Tab to a handle, then use the arrow keys.
Checkerboard: shows exactly which parts are transparent.White background, like a light-mode page.Near-black background, to check the design in dark mode.Your own background color: test on the surface the design will really sit on.

Arrow keys move the point by 1%, Shift for 10%, Alt for 0.1%. Delete removes it.

Polygon, 6 points

Polygon settings

Every value is a percentage of the element unless it says px.

Points (6)

Click an edge on the preview to add a point there, drag points to move them. Coordinates are percentages of the element, measured from its top-left corner.
Add a point after the selected oneDelete the selected point (Delete key)Flip horizontallyFlip vertically
#X (%)Y (%)Remove
  1. Remove point 1
  2. Remove point 2
  3. Remove point 3
  4. Remove point 4
  5. Remove point 5
  6. Remove point 6

Fill rule

Decides what counts as inside when the outline crosses itself or loops around a hole.
Default. A hole only appears when the inner loop winds the opposite way, as in the Frame preset.Every crossing toggles inside and outside, so overlapping loops always cut holes.

Element

The size of the element you will clip. It sets the preview's aspect ratio and converts percentages to px.
Responsive: the shape scales with the element. Best for most layouts.Fixed coordinates computed from the width and height below. Use for fixed-size elements.
Element width in px.
Element height in px.

Editing

Dragged handles jump to grid lines, and arrow keys move one grid step. Hold Alt with the arrows for fine steps.
Draws the full element faintly behind the shape so you can see what the clip removes.

Fill

What the preview element shows. It only affects the preview, not the code.
A built-in illustration with detail at the edges.A flat color, to judge the silhouette.Your own image. It is read in your browser and never uploaded.
Sunset scene, drawn with CSS gradients.Ocean scene, drawn with CSS gradients.Aurora scene, drawn with CSS gradients.

Import CSS

Paste an existing clip-path value or declaration to keep editing it here. Works with polygon(), circle(), ellipse() and inset() in % or px.

Code

Copy the shape as CSS, a Tailwind class, an SCSS variable or an SVG clipPath.
A ready-to-paste CSS rule.A Tailwind arbitrary-property class.The shape as an SCSS variable you can reuse.The same shape as an SVG clipPath, referenced with clip-path: url(#id).
Copy CSSDownload clip-path.css
Adds -webkit-clip-path for Safari 13 and older. Current browsers ignore it, so it is safe to keep.

Presets

One click applies a preset. Undo (Ctrl/⌘+Z) brings your previous design back.
  • Three points: the classic play button or tooltip arrow.
  • Narrow top, wide base. Good for tabs and banners.
  • Slanted sides for dynamic, sporty buttons and section edges.
  • A diamond: four points on the middle of each edge.
  • Regular pentagon, stretched to fill the box.
  • Flat top and bottom: the honeycomb tile.
  • Seven equal sides, point up.
  • Eight sides with a flat top: badges and stop-sign shapes.
  • Five-point star built from a regular pentagram.
  • A block arrow pointing right: next buttons and callouts.
  • A block arrow pointing left.
  • Breadcrumb and step-indicator shape pointing right.
  • Breadcrumb and step-indicator shape pointing left.
  • Speech bubble with a tail: chat previews and testimonials.
  • A plus sign made of twelve points.
  • A polygon with a hole: the outline goes in through a zero-width slit and back out.
  • circle(): avatars and round reveals. Radius is relative to the box diagonal.
  • ellipse(): separate horizontal and vertical radii.
  • inset() with round: a rectangle cropped in from each edge with rounded corners.

Want a site designed with this level of care? Talk to our team

Quick answer

CSS clip-path hides every part of an element outside a shape, so a plain box can render as a triangle, circle, star or arrow without any image. In Playxoft's free CSS Clip-Path Generator, pick a shape, drag its points or handles on the preview (click an edge to add a point), and copy the clip-path as CSS, Tailwind, SCSS or an SVG clipPath. Percent values keep the shape responsive; px values fix it to one element size.

  • Drag-and-drop points
  • Polygon, circle, ellipse, inset
  • Click an edge to add points
  • Snap to grid
  • 19 one-click presets
  • Percent or px output
  • SVG clipPath export
  • Import existing CSS

How to use the Clip-Path Generator

  1. 1Choose Polygon, Circle, Ellipse or Inset, or click a shape under Presets to start from a triangle, star, arrow or frame.
  2. 2Drag the handles on the preview. On a polygon, click an edge to add a point there and press Delete to remove the selected point.
  3. 3Fine-tune exact values in the settings panel, and turn on Snap to grid when you want tidy, round coordinates.
  4. 4Pick Percent or Pixels under Output units (set the element Width and Height for px), then copy from the CSS, Tailwind, SCSS or SVG tab.
  5. 5Click Share to copy a link that reopens this exact shape, or paste an existing clip-path into Import CSS to keep editing it.

What does CSS clip-path do?

clip-path defines a region, and only the part of the element inside it is painted. Everything outside, including the background, borders, box-shadow and child content, is cut away. The element still takes up its full rectangle in the layout, so clipping never makes surrounding content reflow.

.hero-image {
  clip-path: polygon(0% 0%, 100% 0%, 100% 85%, 0% 100%); /* slanted bottom edge */
}

Clipped-away areas also stop receiving clicks and hovers, so a clipped button is only clickable inside its visible shape. The property is defined in the CSS Masking specification, and the shape functions in CSS Shapes.

Which clip-path shape functions can I use?

FunctionExampleGood forNotes
inset()inset(10% 20% round 12px)Crops, rounded windowsOffsets use margin order: top, right, bottom, left
circle()circle(40% at 50% 50%)Avatars, circular revealsA % radius is relative to √(width² + height²) / √2
ellipse()ellipse(45% 35% at 50% 50%)Ovals, spotlightsHorizontal radius uses the width, vertical the height
polygon()polygon(50% 0%, 100% 100%, 0% 100%)Triangles, stars, arrows, badgesStraight edges only; optional evenodd fill rule
path()path("M 0 0 L 200 0 L 100 160 Z")CurvesCoordinates are px only, so it does not scale
shape()shape(from 0% 0%, line to 100% 0%, line to 50% 100%, close)Responsive curvesIn all major engines since early 2026 (Chrome and Edge 135, Safari 18.4, Firefox 148)
url()url(#my-clip)Reusing an SVG <clipPath>Export one from the SVG tab

After the shape you can name a reference box, such as polygon(...) content-box. Without one, coordinates are measured against the border box.

How do polygon coordinates work?

Each point is an x y pair. The origin is the element's top-left corner, x grows to the right and y grows down, so 100% 100% is the bottom-right corner. Percentages are relative to the element's own width (for x) and height (for y), which is why a percentage polygon stretches with the element. Pixel values stay fixed.

The browser joins the points in order and closes the shape back to the first point, so the order matters: crossing edges create a bow-tie. To cut a hole, as in the Frame preset, trace the outer edge, step inward along a zero-width slit, trace the inner edge the opposite way and step back out. With the default nonzero fill rule the opposite winding leaves the middle empty; polygon(evenodd, ...) makes any overlapping loop a hole regardless of direction.

/* A right-pointing block arrow: 7 points, clockwise from the tail */
.arrow {
  clip-path: polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%);
}

How do I animate between two clip-path shapes?

Browsers interpolate clip-path only between the same shape function. Two polygons must also have the same number of points (and the same fill rule); otherwise the change jumps instead of morphing. When one shape has fewer points, pad it with duplicates sitting on top of each other:

.badge {
  /* A triangle written with 4 points: the first two are the same */
  clip-path: polygon(50% 0%, 50% 0%, 100% 100%, 0% 100%);
  transition: clip-path 0.4s ease;
}
.badge:hover {
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
}
@media (prefers-reduced-motion: reduce) {
  .badge { transition: none; }
}

Circles animate radius and center, insets animate each offset and the corner radius, so a circle(0% at 50% 50%) to circle(75% at 50% 50%) transition is the classic circular reveal.

Should I use clip-path or mask?

clip-pathmask-image
EdgeHard, geometric outlineSoft: any level of transparency
Defined byShape function or SVG <clipPath>Image, gradient or SVG <mask>
Fades and featheringNoYes, e.g. linear-gradient(black, transparent)
Responsive shapesYes, with percentagesYes, with mask-size
Best forCut-outs, angled sections, revealsFading edges, texture or logo-shaped masks

Reach for clip-path when the edge is a crisp geometric line, and mask when you need partial transparency.

Why is my box-shadow cut off by clip-path?

Clipping removes everything the element paints outside the shape, and a box-shadow sits outside the shape by definition. Focus outlines are clipped too. The fix is to move the shadow to a wrapper and use filter: drop-shadow(), which follows the visible pixels rather than the box:

.shape-shadow {
  filter: drop-shadow(0 10px 16px rgb(0 0 0 / 0.25));
}
.shape-shadow > .shape {
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

Build the shadow values with the box shadow generator in drop-shadow mode, and give clipped buttons a focus style that stays inside the shape, such as an inset ring or a color change.

Frequently asked questions

The basic shapes (inset, circle, ellipse and polygon) work in every current version of Chrome, Edge, Firefox and Safari. Safari 13 and older needed the -webkit-clip-path prefix, which this generator can add for you. path() has worked in every major browser for several years. shape() is newer: it reached all major engines in early 2026 (Chrome and Edge 135, Safari 18.4, Firefox 148), so keep a polygon() fallback if you support older browsers.
It never changes layout: the element keeps its full rectangle and nothing around it moves. It does change hit testing, so clicks and hovers only register inside the visible shape, and clicks on the clipped-away area pass through to whatever is behind.
Percentages are relative to each element's own box, so a percentage polygon stretches to fit a wider or taller element. A circle's percentage radius is measured against the box diagonal divided by √2, so it stays round. Switch the output to px if the shape must keep exact pixel coordinates.
Tailwind has no clip-path utilities, so use an arbitrary property such as [clip-path:polygon(50%_0%,100%_100%,0%_100%)], where underscores stand for spaces. The Tailwind tab writes that class for you, and it works in Tailwind v3 and v4.
Trace the outer edge, step in along a zero-width slit, trace the inner edge in the opposite direction and step back out, as the Frame preset does. Alternatively start the polygon with the evenodd fill rule, which turns any overlapping loop into a hole.
No. The image is read by your browser and shown through a temporary local URL that is released when you change it or leave the page. Nothing is sent to a server, and the shape itself is only stored in the page link you choose to share.

Last updated by the Playxoft engineering team.

From the designers who built this tool

Want your site to look this polished?

Consistent color, crisp typography and fast pages are what make a site feel premium. We build accessible, high-converting websites with design systems that stay consistent everywhere. Send us your site and we will share honest recommendations, free.