Skip to content
Design & colour

Border Radius Generator

Round each corner on its own, or switch to blob mode where every corner takes a horizontal and a vertical radius to make an organic shape.

Corners

CSS

About the Border Radius Generator

Rounding corners is one CSS property, and most of what there is to know about it is that it takes more values than people realise.

The familiar form sets one radius per corner. The form almost nobody uses takes eight values separated by a slash: four horizontal radii, then four vertical ones. When a corner's two radii differ, that corner is an ellipse rather than a circle — and varying all eight produces the soft, asymmetric shapes that turn up as decorative blobs behind hero sections. There is no SVG involved, which means they scale, animate and take a background image like any other element.

Worth knowing for the ordinary case: a radius larger than half the element's width or height is scaled down proportionally rather than overlapping, which is why setting an enormous radius on a rectangle produces a stadium shape rather than a mess. And a percentage radius is relative to the element's own dimensions, so it stays proportional as the element resizes, while a pixel radius does not.

The relationship between an outer and an inner radius matters when nesting. A card with a 12px radius containing a button with a 12px radius will look wrong — the inner corner should be the outer radius minus the padding, or the two curves will not sit concentrically.

Everything runs in your browser.

Frequently asked questions

What is the eight-value border-radius form?

Four horizontal radii, a slash, then four vertical radii. When a corner has different horizontal and vertical values it becomes an ellipse, and varying all eight is what produces organic blob shapes in pure CSS.

What happens if the radius is bigger than the element?

The browser scales all the radii down proportionally so they do not overlap. That is why a very large radius on a rectangle gives a stadium shape rather than something broken.

Should a nested element use the same radius?

No. For the curves to sit concentrically, the inner radius should be the outer radius minus the padding between them.