TOOLTIKI Lovable tool, really free
Colour CSS

Border radius generator

Generated in your browser · nothing is uploaded

Live preview · collapses to the shortest form
Advertisement
320 × 100

Sets each corner radius independently and writes the shortest shorthand that means it: four equal corners collapse to one value, a diagonal pair to two, and so on.

How to use the border radius generator

1 Drag the radius, or unlink to set each corner.
2 Switch the unit — percentages make ellipses.
3 Copy the shorthand.

The shorthand order is clockwise from the top left — top-left, top-right, bottom-right, bottom-left — and it fills in the same way `margin` does: one value applies to all four, two values set the two diagonals, three set top-left, the pair, and bottom-right. Knowing that is the difference between reading `border-radius: 8px 2px` and guessing at it. Percentages behave differently from pixels in a way that surprises people. A percentage radius is relative to the element’s own width and height **separately**, so on a rectangle it produces an ellipse rather than a circle. `border-radius: 50%` on a square is a circle; on a 200×100 box it is an oval. That is a feature — it is how you draw an ellipse in CSS with no SVG — but it explains why a radius that looked right on one card looks wrong on a wider one. There is also a slash form, `border-radius: 20px / 40px`, which sets horizontal and vertical radii separately for genuinely elliptical corners. It is rarely needed and it is what the browser is really doing behind every value.

Questions

Clockwise from the top left: top-left, top-right, bottom-right, bottom-left — the same fill-in rules as margin.

MDN — border-radius
Advertisement
300 × 250
Was this tool any good?
INTERNAL SIGNAL ONLY · WE USE IT TO FIND TOOLS WORTH REBUILDING