CSS Border Radius Generator

Builds border-radius values with independent control of each corner and a live preview, including the two-value elliptical syntax that produces organic blob shapes rather than plain rounded rectangles.

Live demo · real result from this tool
Unit

Press Generate to create a result.

Processed on your device — nothing is uploaded.

How to use CSS Border Radius Generator

  1. Set a single radius for all corners, or unlock the corners to set each one.
  2. Switch on the elliptical (two-value) mode for blob shapes.
  3. Watch the preview, then copy the generated CSS.
  4. Four values run clockwise from the top left: top-left, top-right, bottom-right, bottom-left.
  5. The browser caps a radius at half the shorter side, so any very large value gives a pill or a circle.
  6. border-radius clips backgrounds and borders, and box-shadow follows it automatically — but child content needs overflow: hidden to be clipped too.

One property, up to eight numbers

border-radius: 8px rounds all four corners. Give it four values and they apply clockwise from the top left. Add a slash and four more — border-radius: 30% 70% 70% 30% / 30% 30% 70% 70% — and the numbers before the slash are the horizontal radii while those after are the vertical ones, making each corner an ellipse rather than a circle. That second form is how every organic blob shape you have seen in a hero section is made, and it is a single property rather than an SVG.

Percentages versus pixels

A pixel radius is fixed, so the same value looks proportionally larger on a small element than a large one. A percentage is relative to the element’s own dimensions, so 50% on all corners turns a square into a circle and a rectangle into a pill — and stays correct at every size. Use pixels for cards and buttons where you want a consistent corner across different-sized elements, and percentages for shapes that should scale with the box. 9999px is the common trick for a pill button, since the browser caps the radius at half the shorter side.

Nested corners need different radii

A rounded element inside another rounded element looks wrong when both use the same value: the inner corner appears too square against the outer curve. The rule designers use is that the inner radius should be the outer radius minus the padding between them. A card with a 16px radius and 8px of padding wants 8px on the inner element. Getting this right is a large part of why some interfaces look carefully made and others do not.

Frequently asked questions

Can I set each corner separately?
Yes — control the top-left, top-right, bottom-right and bottom-left radii independently for asymmetric shapes.
How do I make a pill or circle?
A very large radius (or 9999px) makes pill buttons, and 50% on a square element produces a perfect circle.
What are the two values per corner for?
Border-radius accepts a horizontal and vertical radius per corner, letting you create elliptical, organic blob corners.
How do I make a perfect circle?
border-radius: 50% on an element with equal width and height. On a rectangle the same value gives an ellipse; for a pill shape use 9999px, which the browser caps at half the shorter side.
What does the slash in border-radius mean?
It separates horizontal from vertical radii. The values before the slash set how far each corner's curve extends horizontally, and those after set the vertical extent, making each corner elliptical. It is what produces asymmetric, organic shapes.
Why is my image not following the rounded corners?
A child element is not clipped by its parent's radius unless you ask. Add overflow: hidden to the rounded parent, or apply the same border-radius to the image itself.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close