Toolvist

CSS Border Radius Generator

Shape CSS border-radius with visual sliders for each corner, then copy the finished rule. Free generator for buttons, cards and pill-shaped elements.

Free CSS Border Radius Generator

The Border Radius Generator creates rounded corners with a live preview. Control each corner independently or link them together, then copy the CSS.

Rounded corners pair naturally with the CSS Box Shadow Generator and the Glassmorphism CSS Generator. For more elaborate shaping, the CSS Clip-Path Maker goes further than a radius can.

How to use the Border Radius

  1. 1 Set the values for each corner, or use the link control to keep them equal.
  2. 2 Switch to the elliptical mode to set a horizontal and vertical radius separately per corner.
  3. 3 Check the preview — very large radii on a small element produce a shape rather than a rounded rectangle.
  4. 4 Copy the generated `border-radius` declaration.

Radii as a system

Corner radius is one of the more visible signals of a design system's consistency. Mixing 4px, 8px and 12px at random reads as untidy even when each individual choice is defensible. Committing to a small scale — one radius for controls, one for cards, one for large surfaces — makes an interface feel deliberate.

There is also a semantic convention worth respecting: a smaller radius on a nested element than on its container looks correct, while the reverse looks wrong, because the inner curve appears to fight the outer one. Inset elements should use a slightly smaller radius than the surface they sit within.

  • Use half the height for a pill shape.
  • Nested elements take a smaller radius than their container.
  • The slash separates horizontal from vertical radii.
  • Percentage radii scale with the element; pixel radii do not.

Frequently asked questions

How do I make a pill-shaped button?

Set the radius to half the element's height, or simply use a value larger than half the height, since the browser clamps it. A `border-radius: 9999px` on a button is a common idiom for exactly this reason — any value beyond half the height produces the same fully rounded ends.

What does the slash syntax in border-radius do?

It separates the horizontal radii from the vertical ones. `border-radius: 50% / 20%` gives an ellipse whose horizontal radius is half the width and vertical radius a fifth of the height. Without the slash, the same value applies in both directions and you get a circle.

Why does my rounded corner look wrong on a small element?

Because the radius competes with the element's size. Once the horizontal radius exceeds half the width, the two corners on that edge meet and the shape becomes a curve rather than a rectangle with rounded ends. The browser clamps it, so the result is a shape you may not have intended rather than a broken rendering.

Related Developer Tools

Browse all Developer Tools →

You might also need

Tools from other categories that people pair with the Border Radius:

Browse the full tool directory →