CSS Border Radius Generator
Set each corner of a CSS border radius independently, link them, and copy the shorthand rule.
Preview
Options
border-radius: 24px;Saving needs a Dex account. The tool never does.
How it works
- Drag one slider with the corners linked, or unlink them to set each corner separately. The preview square shows the result at a readable size.
- The shorthand is written the way CSS expects: one value when all corners match, four values starting at the top left and going clockwise when they do not.
- Switch between pixels and percentages. Percentages are relative to the box, which is how a pill shape is made without knowing the element height.
- The rule is generated in the page and copied with one click.
Examples
A pill button
Use 50 percent with linked corners and the element becomes a capsule at any height, which pixels cannot do without knowing the size.
A card with one square corner
Unlink, set the top left to zero and keep the rest at 16px. That single square corner is enough to suggest a folded page.
Frequently asked questions
Why four values instead of one?
The shorthand takes one to four values. Four sets each corner clockwise from the top left; when all four match the browser writes a single value.
What is the difference between px and percent?
Pixels are absolute; percentages scale with the element size. Percentages above 50 on both axes can produce an ellipse rather than a circle, which is why pills use 50 percent deliberately.
Can I round only the top?
Yes. Unlink the corners and set the bottom two to zero. The shorthand will list all four.
Does this clip content?
A border radius clips the background but not overflowing children unless the element also has overflow hidden. The tool generates the radius only.