Ttooleras
✂️

CSS Clip Path Generator

CSS Tools

Create custom CSS shapes with clip-path — polygons, circles, ellipses, SVG paths. Free, private — all processing in your browser.

border-radius: 16px;
Advertisement

The CSS Clip Path Generator creates custom shapes beyond what border-radius can achieve. Use clip-path to turn rectangles into hexagons, triangles, diagonal sections, speech bubbles, stars, or any polygon you can imagine. Supports all modern clip-path syntaxes: polygon() for custom points, circle() and ellipse() for curved shapes, inset() for rectangular crops, and raw SVG path references for arbitrarily complex shapes. Drag-and-drop polygon points with live preview; apply to images, divs, or text to create shaped UI elements that flat design cannot match.

Clip-path is one of CSS's most under-used features. While border-radius handles simple rounded corners, clip-path lets you create hexagonal avatars, diagonal hero sections, angled content dividers, speech bubbles, and star-shaped badges — all without SVG files or JavaScript. Common use cases include portfolio grids with unusual shapes, testimonial cards with tail pointers, section dividers at angles, and photo galleries with creative crops. Every shape generated by this tool is a valid clip-path CSS property value ready to paste into your stylesheet.

CSS Clip Path Generator — key features

Visual polygon editor

Drag points on the preview to shape your polygon. Add or remove points. See result live.

All shape functions

polygon, circle, ellipse, inset — plus SVG path for complex shapes.

Preset shapes

Triangle, diamond, hexagon, star, parallelogram, chevron, message bubble, arrow — one-click.

Apply to images

Preview clip-path on actual images. See how photos look with shapes.

Coordinate input

Type exact percentages or pixel values for precision. Useful for design systems.

Animate between shapes

Test animation between two polygon shapes (point count must match). Preview morph.

Copy CSS

Complete clip-path value ready for your stylesheet.

100% client-side

Runs in browser. Your images (if tested) stay on your device.

How to use the CSS Clip Path Generator

  1. 1

    Pick a shape type

    Polygon for custom shapes (most flexibility). Circle, ellipse, inset for simpler shapes.

  2. 2

    Start with preset or blank

    Triangle, hexagon, star, message bubble as starting points. Or start with a basic polygon.

  3. 3

    Drag points (polygon)

    Each vertex is a draggable point. Move them to shape the polygon. Add points for more complex shapes.

  4. 4

    Tweak with number inputs

    For precise positioning, type exact percentages (more consistent across sizes) or pixels.

  5. 5

    Preview on different content

    Test on image, solid div, text. Same clip-path looks different depending on content.

  6. 6

    Copy the CSS

    Paste into your stylesheet on the target element.

Common use cases for the CSS Clip Path Generator

Hero sections

  • Angled hero background: Diagonal cut at the bottom of hero section. Use polygon to create parallelogram shape.
  • Geometric hero image: Crop hero image to hexagon or custom polygon for distinctive brand feel.
  • Shape dividers between sections: Wave, triangle, or angled shapes between page sections (alternative to SVG dividers).

Profile and portfolio

  • Hexagonal avatars: Portfolio team grids with hexagon avatars. Different from circular — more distinctive.
  • Geometric photo gallery: Mix of triangles, hexagons, rhombus shapes for creative portfolio layout.
  • Diamond photo frames: Rotate plus clip-path for diamond framing.

Content decoration

  • Speech bubbles: Message bubble shape with pointer tail using polygon. Chat UI, testimonials.
  • Arrow/chevron: Directional shapes — nav arrows, progress indicators.
  • Star ratings background: Star-shaped backgrounds for featured testimonials.
  • Badge/banner shapes: Chevron banners, parallelogram tags, rhombus notifications.

Creative effects

  • Reveal animations: Animate clip-path from 0% to 100% to reveal content.
  • Masking effects: Show only parts of an image. Combine with hover for interactive reveals.
  • Split screen layouts: Diagonal split between two images or content sections.
  • Wipe transitions: Transition between pages using clip-path animation.

CSS Clip Path Generator — examples

Simple triangle

Point up triangle.

Input
3 points: top center, bottom left, bottom right
Output
.triangle {
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

Hexagon

6-point regular hexagon.

Input
Six points around center
Output
.hexagon {
  clip-path: polygon(
    50% 0,
    100% 25%,
    100% 75%,
    50% 100%,
    0 75%,
    0 25%
  );
}

Star

5-point star.

Input
10 points alternating inner/outer
Output
.star {
  clip-path: polygon(
    50% 0,
    63% 38%,
    100% 38%,
    69% 59%,
    82% 100%,
    50% 75%,
    18% 100%,
    31% 59%,
    0 38%,
    37% 38%
  );
}

Diagonal hero

Parallelogram hero section.

Input
Angled cuts top-left and bottom-right
Output
.hero {
  clip-path: polygon(0 0, 100% 0, 100% 80%, 0 100%);
  height: 400px;
  background: url(hero.jpg);
}

Circle clip

Round image crop.

Input
circle at center
Output
.avatar {
  clip-path: circle(50% at 50% 50%);
}

Message bubble

Chat bubble with pointer.

Input
Rectangle with pointer cutout at bottom
Output
.bubble {
  clip-path: polygon(
    0 0,
    100% 0,
    100% 75%,
    70% 75%,
    60% 100%,
    50% 75%,
    0 75%
  );
}

Chevron arrow

Pointer/arrow shape.

Input
5 points for arrow
Output
.chevron {
  clip-path: polygon(0 0, 75% 0, 100% 50%, 75% 100%, 0 100%);
}

Animated reveal

Reveal element with clip-path animation.

Input
Morph from full-width to centered rectangle
Output
@keyframes reveal {
  0% { clip-path: inset(0 100% 0 0); }
  100% { clip-path: inset(0 0 0 0); }
}
.reveal {
  animation: reveal 1s ease-out forwards;
}

Technical details

CSS clip-path syntax:

``css
clip-path: <shape-function> | url(#svg-id) | none;
``

Shape functions:

inset() — rectangular inset:
``css
clip-path: inset(10px); /* 10px from all edges */
clip-path: inset(10px 20px); /* 10px top/bottom, 20px left/right */
clip-path: inset(10px 20px 30px 40px); /* top, right, bottom, left */
clip-path: inset(10px round 20px); /* with border-radius */
``

circle() — circular clip:
``css
clip-path: circle(50%); /* centered, 50% radius */
clip-path: circle(50% at 50% 50%); /* explicit position */
clip-path: circle(100px at 200px 300px); /* pixel values */
``

ellipse() — elliptical clip:
``css
clip-path: ellipse(50% 30%); /* x-radius 50%, y-radius 30% */
clip-path: ellipse(50% 30% at 50% 50%); /* with position */
``

polygon() — custom shape with points:
``css
clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); /* diamond */
clip-path: polygon(0 0, 100% 0, 50% 100%); /* triangle */
clip-path: polygon( /* hexagon */
50% 0,
100% 25%,
100% 75%,
50% 100%,
0 75%,
0 25%
);
``

Each point is x y in order. Percentages relative to element box.

path() — SVG path reference:
``css
clip-path: path("M 50 0 L 100 100 L 0 100 Z");
``

Uses SVG path data syntax. Powerful but harder to edit. Used for complex shapes.

url() — reference to SVG clipPath element:
``css
clip-path: url(#my-clip);
``

With inline SVG:
``html
<svg width="0" height="0">
<clipPath id="my-clip">
<polygon points="50,0 100,50 50,100 0,50" />
</clipPath>
</svg>
``

Common shapes:

- Triangle: polygon(50% 0, 100% 100%, 0 100%)
- Diamond: polygon(50% 0, 100% 50%, 50% 100%, 0 50%)
- Pentagon: polygon(50% 0, 100% 38%, 81% 100%, 19% 100%, 0 38%)
- Hexagon: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%)
- Star (5-point): polygon(50% 0, 63% 38%, 100% 38%, 69% 59%, 82% 100%, 50% 75%, 18% 100%, 31% 59%, 0 38%, 37% 38%)
- Parallelogram: polygon(25% 0, 100% 0, 75% 100%, 0 100%)
- Chevron: polygon(0 0, 75% 0, 100% 50%, 75% 100%, 0 100%)
- Message bubble: polygon(0 0, 100% 0, 100% 75%, 75% 75%, 75% 100%, 50% 75%, 0 75%)

Browser support:

Widely supported in modern browsers. clip-path with polygon(), circle(), ellipse(), inset() works in Chrome, Firefox, Safari, Edge since 2016-2017. SVG path syntax requires more recent versions.

Animation:

clip-path can be animated! The number of points must match between keyframes:

``css
@keyframes morph {
0% { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
100% { clip-path: polygon(50% 100%, 100% 0, 0 0); }
}
``

Animating clip-path with SVG paths requires the SVG Morph API (more complex).

Performance:

- inset(), circle(), ellipse(): very fast, GPU-accelerated.
- polygon() with few points: fast.
- polygon() with many points (100+): can slow rendering.
- path() and SVG url(): slower than CSS shape functions.

Differences from other techniques:

- clip-path vs border-radius: border-radius only rounds corners. clip-path creates arbitrary shapes.
- clip-path vs overflow: hidden: overflow: hidden crops to element box. clip-path can crop to any shape.
- clip-path vs mask-image: mask-image uses an image for masking (can have gradients, fades). clip-path creates hard-edge shapes.
- clip-path vs SVG clipPath: CSS clip-path is the modern CSS way. SVG clipPath is older, more powerful in SVG context.

Common problems and solutions

Clip-path does not affect layout

Clipped element still occupies its full box for layout purposes — even invisible parts take space. Plan layout around the bounding box, not the visible shape.

Complex polygons with many points

100+ point polygons impact performance. For complex shapes, consider SVG clipPath instead of CSS polygon.

Animation requires matching point count

To animate between two polygon shapes, both must have the same number of points. Add invisible midpoints to match if shapes differ.

Content overflows outside clip

Clip-path hides content outside the shape, but child absolute-positioned elements may still be visible. Use overflow: hidden if needed alongside clip-path.

Shadow does not follow clip shape

box-shadow follows the element box, not the clipped shape. Use filter: drop-shadow instead for shadows matching clipped shapes.

Older browsers

Very old browsers (IE11) do not support clip-path. Modern clip-path is widely supported from 2016-2017. For IE11 support, use SVG clipPath or alternative layout.

Pixel vs percentage confusion

Pixels are fixed regardless of element size. Percentages scale with element. For responsive shapes, prefer percentages. For fixed-size shapes (icons), use pixels.

Inset with border-radius rounded

inset() has an optional round keyword: `inset(10px round 20px)` — creates rounded rectangle clip. Useful for clipping rounded content.

CSS Clip Path Generator — comparisons and alternatives

clip-path vs border-radius: border-radius is limited to rounded corners. clip-path creates any polygonal shape. Use border-radius for simple cases, clip-path for custom shapes.

clip-path vs overflow: hidden: overflow: hidden crops child content to the parent rectangle. clip-path can crop to any shape — triangle, star, polygon. clip-path applies to the element itself.

clip-path vs mask-image: mask-image uses an image (usually SVG or gradient) for masking — supports soft edges, gradients. clip-path creates hard-edged geometric shapes. For smooth transitions, use mask-image; for precise shapes, clip-path.

clip-path vs SVG clipPath: CSS clip-path is modern, easier, declarative. SVG clipPath is older, can contain complex shapes. CSS is preferred for new work; SVG for advanced SVG-within-SVG scenarios.

Polygon vs path(): polygon() is easier to edit (point coordinates). path() uses SVG path syntax (Move, Line, Curve commands) — more powerful for curves and complex shapes. For geometric shapes, polygon; for organic shapes, path.

clip-path animation vs shape morphing libraries: CSS clip-path animations require same number of points between keyframes. For complex morphing (different topology), use libraries like Flubber.js or SVG morph packages.

Frequently asked questions about the CSS Clip Path Generator

What is CSS clip-path?

clip-path is a CSS property that crops an element to any shape — polygon, circle, ellipse, custom SVG path. Unlike border-radius (only rounded corners) or overflow: hidden (only the element rectangle), clip-path creates arbitrary geometric or organic shapes.

How do I make a triangle in CSS?

Use clip-path with polygon(): clip-path: polygon(50% 0, 100% 100%, 0 100%) creates a triangle pointing up. The three points are (center-top, right-bottom, left-bottom). Change coordinates for different orientations.

Does clip-path affect the element size?

No, clip-path only affects visibility. The element still takes its full box size for layout purposes — invisible areas still occupy space. Neighboring elements position based on the rectangular box, not the visible clip shape.

Can I animate clip-path?

Yes, but polygon animations require the same number of points between keyframes. For reveal effects (one element growing into visible area), inset() animations are simple. For complex morphs, use matching-point polygons.

Is clip-path well supported?

Yes. All modern browsers support basic shapes (polygon, circle, ellipse, inset) since 2016-2017. path() and SVG url() support is slightly newer. Safari had minor quirks historically; now works well.

How do I make an avatar with a hexagon?

Apply clip-path: polygon(hexagon points) to an img element. Example: <img class=hex src=avatar.jpg> + .hex { clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%) }. Works on square images; aspect ratio matters.

What is the difference between polygon and path()?

polygon() takes a list of point coordinates — good for shapes with straight edges. path() uses SVG path syntax (move, line, curve commands) — supports curves and complex shapes. polygon is easier; path is more powerful.

Why does my clip-path not animate?

Common issue: different point counts between keyframes. A triangle (3 points) cannot morph into a pentagon (5 points) without matching. Add duplicate points to bridge. Or animate inset() for rectangular reveals instead.

How do I show only part of an image?

Use clip-path on the img element. clip-path: inset(10% 20% 10% 20%) shows middle 60% × 80% of the image. For organic shapes, use polygon. For soft-edge crops, use mask-image instead.

Can clip-path have shadows?

Not directly. box-shadow follows the element box, not the clip shape. Use filter: drop-shadow(...) instead — drop-shadow respects the clip-path shape. Example: filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)) casts proper shadow from clipped element.

Additional resources

Advertisement

Related tools

All CSS Tools

Learn more

Explore more tools

200+ free tools that run in your browser.

Browse all tools →