Border Radius Generator

Generates a border-radius value from four corner radii, with optional separate vertical radii for elliptical corners. Choose px, percent or rem units and see a live preview.

Use the tool

Why this tool exists

Rounded corners are easy until you want something other than a uniform curve. A leaf shape, a speech bubble, a pill that curves only on one side, or an organic blob all rely on the slash syntax of border-radius, which very few people remember.

Enter the top-left, top-right, bottom-right and bottom-left radii. Leave the vertical fields at 0 for ordinary circular corners, or fill them in to make each corner an ellipse. The output switches to the full horizontal-slash-vertical form only when it is needed, and you can pick units. The preview shows the shape immediately so you can tune it by eye. It is computed in your browser.

How to use it

  1. Enter the four corner radii, starting at top-left and going clockwise.
  2. Fill in the vertical radii only if you want elliptical corners.
  3. Choose the unit: px, %, rem or similar.
  4. Copy the border-radius line.

Frequently asked questions

What does the slash in the output mean?

In border-radius, the values before the slash are horizontal radii and those after are vertical radii. Without a slash, each corner is a circle. With one, each corner can be an ellipse.

What does 0 mean in the vertical fields?

Zero means "same as the horizontal value", so the corner stays circular. To make a vertical radius truly zero, use a very small number instead.

How do I make a circle or a pill?

For a circle on a square box, use 50%. For a pill on a wide box, use a radius at least half of the height, or a very large value such as 9999px.

Which order are the corners in?

Top-left, top-right, bottom-right, bottom-left, clockwise. This is the same order the CSS shorthand uses when you give four values.