Skip to content

Clip Path Generator API

POST https://api.findutils.com/api/tools/clip-path-generator/execute

Generate a CSS clip-path from a named shape (triangle, trapezoid, parallelogram, rhombus, pentagon, hexagon, octagon, star, chevron, message, circle, ellipse, inset) or from your own percentage coordinate pairs. Coordinates are relative to the element box, so the shape scales with the element. Returns the full "clip-path: ...;" rule, the bare value, and the resolved points. Note that clip-path cuts the element visually but does not change its layout box.

Request body

application/json
  • shape

    string optional

    Named shape. Default triangle. Ignored when points is supplied. One of triangle · trapezoid · parallelogram · rhombus · pentagon · hexagon · octagon · star · chevron · message · circle · ellipse · inset. Default "triangle".

  • points

    string optional

    Custom polygon as comma-separated percentage pairs, e.g. "50% 0%, 0% 100%, 100% 100%". At least three pairs. Overrides shape.

  • radius

    number optional

    For shape=circle or ellipse: radius in percent (1 to 100). Default 50. Default 50.

  • inset

    number optional

    For shape=inset: how far each edge is pulled in, in percent (0 to 49). Default 10. Default 10.

  • round

    number optional

    For shape=inset: corner rounding in px (0 to 200). Default 0. Default 0.

Example arguments

Verified
{
  "shape": "hexagon"
}