CSS Clip-Path Generator
Cut any element into a triangle, hexagon, star, arrow, circle or your own polygon with clip-path, and copy the CSS with a live preview.
How to cut shapes with CSS clip-path
Choose a shape
Pick a triangle, hexagon, star, arrow, circle and more, or paste your own value.
Choose the fill colour
The preview updates at once.
Copy or download
Paste the clip-path rule into your stylesheet.
Worked example
This is what CSS Clip-Path Generator gives for its own sample values. Open the tool above and change anything to try your own.
- Shape
- Hexagon
- Or paste your own clip-path value (optional)
- Fill colour
- #0f766e
CSS
.shape {
width: 200px;
height: 200px;
background: #0f766e;
clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%);
}About CSS Clip-Path Generator
Make any box into a shape with the clip-path property. The result is a CSS rule with the polygon, circle, ellipse or inset value, so there is no image to load and the shape scales cleanly.
FAQs
Does clip-path work on images?
Yes. Apply it to the img element or to a wrapper and the picture is cut to the shape.
Why did my shadow disappear?
clip-path cuts off everything outside the shape, including box-shadow. Put filter: drop-shadow() on a parent instead.
Can I type my own shape?
Yes. Paste a value such as polygon(50% 0%, 100% 100%, 0% 100%) into the custom box.