Developer tool

CSS Clip-Path Editor

Choose a shape, preview the clipping and copy the CSS rule.

Runs in your browser. No upload.

About this tool

CSS Clip-Path Editor made simple.

The preview is local and uses standard CSS shapes. Browser support can vary; test the copied rule in your target browsers.

Guide

Using CSS Clip-Path Editor

This tool gives you ready-made CSS clip-path shapes. You pick one of six presets from a list, see a sample box cut into that shape, and copy the matching rule for your own element. The presets are circle, ellipse, inset, triangle, diamond and hexagon. It is not a free-drawing editor, so you cannot drag points or build a custom polygon here.

How to use it

  1. Open the Shape list and choose Circle, Ellipse, Inset, Triangle, Diamond or Hexagon. The sample box on the page is cut into that shape straight away.
  2. Read the rule in the CSS output box. It has a class called my-element with one clip-path line inside it.
  3. Press Copy CSS to copy the rule. If your browser blocks copying, the text is selected so you can copy it by hand.
  4. Paste it into your stylesheet, change my-element to the class you use, and view the result in the browsers you need to support.

Worked examples

A hexagon badge

You enter
Shape
hexagon
You get
Css
.my-element { clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); }

The six pairs of numbers are the corners of the hexagon, written as percentages of the element's width and height. They start at the top left corner of the flat top edge and go clockwise.

Run through the tool’s own code.

A perfect circle on a square

You enter
Shape
circle
You get
Css
.my-element { clip-path: circle(50% at 50% 50%); }

The circle has a radius of 50 percent and its centre is in the middle of the element. On a square box it is a true circle. On other box shapes, check the result on your own element, or try the Ellipse preset instead.

Run through the tool’s own code.

A rectangle with rounded corners cut in

You enter
Shape
inset
You get
Css
.my-element { clip-path: inset(8% 10% 8% 10% round 12px); }

Inset trims 8 percent off the top and bottom and 10 percent off the left and right, in that top, right, bottom, left order. The round 12px part gives the trimmed rectangle softly rounded corners.

Run through the tool’s own code.

When it helps

  • Cut an avatar, card or banner into a circle, hexagon or diamond with one line of CSS.
  • Find a starting polygon, then paste it into your own project and adjust the percentages by hand.
  • Show a teammate what clip-path does with a live sample instead of describing it.
  • Check that the percentages in a shape stay the same when the element changes size.

Limits to keep in mind

  • There are exactly six fixed shapes. You cannot change their sizes, add points or draw a path in this tool.
  • The sample box is a plain block, not your own image or element, so the cut may look different on your real content.
  • Anything outside the shape is hidden, so text or borders near the edges of your real element can be cut off. Look at your actual content after you paste the rule.
  • The tool only copies text. There is no download button and it does not remember your last choice.

Tips

  • Use percentages for the points, as the presets do, so the shape follows the element when it is resized.
  • Edit one number of the copied polygon at a time and reload your page, to see what each point moves.
  • Choose Inset when you only want to trim the edges and round the corners, and one of the polygon shapes when you want straight-sided points.

Sources

Common questions

About CSS Clip-Path Editor.

What does CSS clip-path do?

It shows only the part of an element inside a shape you describe and hides the rest. The shape can be a circle, an ellipse, an inset rectangle, a polygon or a path. The element's own box is the default reference.

Can I draw my own polygon in this tool?

No. It has six presets only. To make a custom polygon, copy the hexagon or triangle rule and change its percentage pairs by hand, then check the result in your browser while you edit the numbers.

Why are the shapes written in percentages?

Percentages are measured against the element's own width and height, so the shape scales with the element. A fixed pixel shape would stay the same size and look wrong on a larger or smaller box.

What is the difference between inset and polygon?

Inset describes a rectangle by how much to trim off each of the four sides, and it can round the corners. A polygon lists the corner points of any straight-sided shape, such as a triangle, a diamond or a hexagon.

Will the copied rule work in every browser?

The shapes used here are basic ones that modern browsers handle, but older browsers can differ. The page itself advises testing the copied rule in the browsers you target, especially if you use it on text or on interactive controls.

Is my data uploaded?

No. The shape list, the sample and the CSS text all run in your browser. You type nothing personal, and nothing is sent anywhere or saved between visits.

How do I use CSS clip-path editor?

Choose a shape, preview the clipping and copy the CSS rule.

Is my data uploaded to a server?

No. This tool runs locally in your browser. Your input is not uploaded.