Tools / Border-Radius Generator

Border-Radius Generator.

Set each corner radius, including elliptical corners, and copy the shortest CSS or Tailwind classes.

Runs in your browser
CSS

                
Tailwind

                
Longhand

                

About Border-Radius Generator

The Border-Radius Generator gives you visual control over rounded corners. Set the radius of each corner in pixels, percent or rem and the preview box follows. Switch on elliptical corners to give every corner its own vertical radius, which is how organic blob shapes are made: 30% 70% 70% 30% / 30% 30% 70% 70% turns a square into a pebble. The output is the shortest valid border-radius shorthand, collapsing equal values the way you would by hand, so 12px 12px 12px 12px becomes 12px and 8px 16px 8px 16px becomes 8px 16px. You also get the four longhand properties for when you only want to override one corner, and Tailwind classes: equal pixel radii map to the named scale (rounded-lg is 8px, rounded-2xl is 16px, rounded-full is 9999px), uneven corners map to rounded-tl and friends, and anything else becomes an arbitrary value. A frequent mistake is using 50% on a rectangle and expecting a pill: percentages are relative to each side, so you get an ellipse; use a very large pixel value such as 9999px for pill buttons. Another is forgetting that the shorthand order is top-left, top-right, bottom-right, bottom-left, clockwise from the top left. Everything runs in your browser.

How to Use

  1. Set the four corner radii and the unit.
  2. Turn on elliptical corners for blob shapes and set the vertical radii.
  3. Copy the shorthand CSS, the longhands or the Tailwind classes.

Frequently Asked Questions

In which order are the corners written?

Clockwise from the top left - top-left, top-right, bottom-right, bottom-left. Values after a slash are the vertical radii in the same order.

How do I make a pill-shaped button?

Use a radius larger than half the height, such as 9999px (rounded-full in Tailwind). 50% creates an ellipse on non-square elements.

What happens if the radii are bigger than the box?

Browsers scale all radii down proportionally until they fit, so the shape stays smooth.

Is anything uploaded?

No. The CSS is generated in your browser.

Related Tools