Skip to main content
CalcChef

CSS Border Radius Generator

Create CSS border-radius values for rounded corners, circles, pills, and organic shapes with per-corner controls and copyable code. How it works

Use the CSS Border Radius Generator

10px
160 × 160
css
border-radius: 10px;
160px
160px
#6366f1
0px

About the CSS Border Radius Generator

On a 160 × 160 px box, border-radius: 80px or 50% draws a circle. This generator sets the radius for each corner in px or %, with optional elliptical corners, and writes it as CSS, Tailwind, React Native, SCSS or clip-path code. An optional corner-shape (bevel, notch, scoop, squircle, square or superellipse) changes the curve itself in browsers that support it. When two radii on one side add up to more than that side, browsers shrink every radius by the same factor, and the page shows a note when that happens.

Corner overlap on a 160 × 160 px box

Radius on every cornerScale factor fRadius drawn
60 px160 px
80 px180 px
100 px0.880 px
120 px0.66780 px
150 px0.53380 px

Each side needs two radii, so on a 160 px side anything above 80 px is shrunk by f = 160 ÷ (2 × radius), the rule in CSS Backgrounds Level 3, section 4.5. The CSS the page writes still shows the radius you set; the browser does the shrinking.

How to use this tool

  1. Choose a preset (Circle, Pill, Soft Corners, Rounded Rectangle, Speech Bubble or Egg) or start from 10 px on every corner.
  2. Keep Linked on to move all corners together, or switch to Individual to set each corner. Choose px or %, and turn on Elliptical to set a horizontal and a vertical radius per corner.
  3. Set the preview width and height from 60 to 300 px so the shape matches your element.
  4. Optionally pick a Corner shape other than round; for superellipse, set the exponent from −4 to 4.
  5. Pick the CSS, Tailwind, React Native, SCSS or clip-path tab and copy the code.

Frequently asked questions

How do I make a circle with border-radius?
Use 50% on a box whose width equals its height. The Circle preset uses 50% on a 200 × 200 px box. On a 260 × 120 px box the same 50% gives an ellipse, because the horizontal radius is 130 px and the vertical radius 60 px.
How do I make a pill-shaped button?
Use a radius of half the height in px. The Pill preset uses 60 px on every corner of a 260 × 120 px box, so the ends are semicircles. A larger radius gives the same pill: 100 px on that box is scaled by 0.6 and drawn at 60 px.
How do I make a squircle or a beveled corner in CSS?
Keep the border-radius and add corner-shape: border-radius: 30px; corner-shape: squircle; gives squircle corners, and bevel cuts each corner straight. The keywords stand for superellipse() values (MDN): squircle is superellipse(2), round 1, bevel 0, scoop −1, square infinity and notch −infinity. The property only changes a corner whose radius is above 0. MDN marks it experimental and not Baseline, so a browser without it draws ordinary round corners. The CSS tab writes a corner-shape line and the Tailwind tab an arbitrary [corner-shape:...] class.
What does the slash in border-radius mean?
With elliptical corners the CSS lists the four horizontal radii, a slash, then the four vertical radii, for example 10px 20px 30px 40px / 5px 10px 15px 20px. Without a slash, each corner is a circular arc.
Why do my corners look smaller than the numbers I set?
Two radii on one side add up to more than that side, so the browser multiplies every radius by f = min(side ÷ sum of its two radii). With 100 px corners on a 160 px square, f is 0.8. The page shows a note when this happens.
Why does the Tailwind tab write rounded-[50%] and not rounded-full?
Tailwind's rounded-full is its pill utility, written as calc(infinity * 1px) in the CSS. On a box that is not square it does not match the ellipse that 50% draws, so the tab writes rounded-[50%] for linked corners at 50%. Other linked values are written as rounded-[10px], and 0 is rounded-none.

Related Tools

View all tools