CSS border radius generator

A CSS border radius generator sets how rounded each corner of an element is. One value such as border-radius: 12px rounds all four corners; four values set top-left, top-right, bottom-right and bottom-left in that order.

Round the corners of an element one corner at a time, preview it on a light and a dark background, and copy one clean border-radius declaration.

How to use the generator

  1. Pick px or %, then drag or type a value into each corner slider. Values run 0–200.
  2. Switch between the light and dark preview to see how the rounded corners read against each background.
  3. Turn on Elliptical to give corners a horizontal and a vertical radius, tick Link all corners to move them together, and press Copy CSS.

Top-left

Top-right

Bottom-right

Bottom-left

Light backgroundLive preview box
Dark backgroundLive preview box

Your CSS

border-radius: 12px 12px 12px 12px;

What each corner value does

The shorthand order is top-left, top-right, bottom-right, bottom-left, so border-radius: 12px 24px 12px 24px; rounds the top-left and bottom-right to 12px and the top-right and bottom-left to 24px. Fewer values repeat the opposite corner: one value rounds every corner equally, two values apply top-left/bottom-right first, and three apply top-left, top-right/bottom-left, then bottom-right.

In elliptical mode each corner gets a horizontal and a vertical radius, output as horizontal values / vertical values, for example border-radius: 40px 20px / 20px 40px;. Link all corners keeps a single value across the four corners so the shape stays symmetrical while you tune it.

Copy-ready border-radius examples

Same radius on every corner

border-radius: 16px;

Different radius per corner

border-radius: 4px 24px 24px 4px;

Elliptical corners (horizontal / vertical)

border-radius: 40px 20px / 20px 40px;

Related generators

Pair rounded corners with the other CSS generators on this site.

Frequently asked questions

What is the order of values in border-radius?

Up to four values run clockwise starting at the top-left: top-left, top-right, bottom-right, bottom-left. One value applies to all corners, two values apply top-left/bottom-right then top-right/bottom-left, and three values apply top-left, top-right/bottom-left, bottom-right. Omitted values copy the opposite corner.

What does elliptical mode do?

Elliptical mode sets a horizontal and a vertical radius for every corner, copied as border-radius: 1px 2px 3px 4px / 5px 6px 7px 8px; — the values before the slash are the horizontal radii and the values after it are the vertical radii. A corner with different horizontal and vertical radii rounds into an ellipse instead of a circle.

What does linking all corners do?

With corners linked, changing one corner updates all four at once, so a single slider keeps every corner identical. Unlink to set each corner independently, for example a pill-shaped button with one sharp corner.

Does border-radius affect layout or clip content?

Rounded corners never move or resize neighbouring elements, just like box-shadow. However, the element's content and any child with overflow: hidden are clipped by the rounded edge, and a background color or image stops at the radius. Previewing on both a light and a dark background shows how the corners read against different fills.

More CSS generators

Color tools

Image tools

Image & SVG tools

Typography & units

More free tools

All free tools