DevToolsmith

CSS Border Radius Generator

Round each corner separately in px, rem or %, or link them, with a live preview. Turn on elliptical corners to give every corner its own horizontal and vertical radius for blob and egg shapes. The shortest border-radius shorthand and a Tailwind class are ready to copy.

Runs 100% in your browser — nothing is uploaded

Presets:
px
CSS
border-radius: 16px;
Tailwind
rounded-[16px]

Presets

ShapeCSS
Rounded border-radius: 8px;
Pill border-radius: 9999px;
Circle border-radius: 50%;
Top only border-radius: 12px 12px 0 0;
Speech bubble border-radius: 16px 16px 16px 0;
Leaf border-radius: 0 60%;
Blob border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
Egg border-radius: 50% / 60% 60% 40% 40%;

Nested corners

CSS
.card       { --radius: 16px; --pad: 8px; border-radius: var(--radius); padding: var(--pad); }
.card > img { border-radius: calc(var(--radius) - var(--pad)); }  /* 8px */

Adding depth as well? Use the box shadow generator. Converting the values to rem? Try px to rem.

Frequently asked questions

How does the border-radius shorthand work?

Values go clockwise from the top-left corner: top-left, top-right, bottom-right, bottom-left. With fewer values the rest are copied: one value sets all corners, two set top-left and bottom-right, then top-right and bottom-left, and three set top-left, the top-right and bottom-left pair, then bottom-right. The tool always writes the shortest form.

What does the slash in border-radius mean?

It separates horizontal from vertical radii. border-radius: 50% / 30% gives every corner an ellipse that is 50% of the width across and 30% of the height down. Different values per corner on both sides of the slash produce organic blob shapes; turn on “Elliptical corners” to edit them.

How do I make a pill or a circle?

For a pill, use a radius larger than half the height, like 9999px: when radii are too big for the box, the browser scales them all down until they fit, which gives perfectly round ends at any size. For a circle, use 50% on an element with equal width and height (aspect-ratio: 1).

px, rem or %?

Use px or rem for a consistent corner on every card and button whatever its size; rem also scales with the user’s font size. Use % when the curve should be proportional to the element, as for circles and blob shapes. Percentages refer to the width for horizontal radii and the height for vertical ones, so 10% on a wide box gives elliptical corners.

Why do nested rounded corners look wrong?

A rounded element inside another rounded element with padding needs a smaller radius: inner radius = outer radius − padding. With the same radius on both, the gap between the curves is thicker at the corners than along the sides.