CSS Border Radius Generator
Controls
Preview
CSS Output
How to Use
- Link or split — Toggle "All corners" to round uniformly, or set each corner independently.
- Set values — Drag sliders or type values for each corner.
- Pick a unit — px for fixed UI, % for scalable shapes, rem for typography-relative rounding.
- Copy & paste — Use "Copy Shorthand" for one line or "Copy Longhand" for individual corners.
What Is CSS Border Radius?
border-radius rounds element corners before backgrounds and borders are clipped. One value rounds all corners; up to four values target each corner clockwise from top-left.
Percentages are relative to element size — 50% on a square makes a circle. Supported universally in all modern browsers.
Common Use Cases
Tips & Best Practices
Top-left, top-right, bottom-right, bottom-left — clockwise from top-left.
Equal width and height + border-radius: 50%. That's it.
Use 9999px for pill ends without calculating half the element height.
Inner cards look better with a slightly smaller radius than the outer card.
Frequently Asked Questions
What is the border-radius shorthand order?
Four values: top-left, top-right, bottom-right, bottom-left. Two values: diagonal pairs. One value: all corners equal.
Should I use px, %, or rem?
px for consistent components. % for scalable rounding (circles, fluid cards). rem to track root font size.
Why does my image stay square?
Apply radius to the img directly, or use a wrapper with overflow: hidden. Radius on a parent alone may not clip children.
Can I make elliptical corners?
Yes. Use slash syntax: border-radius: 40px / 20px for different horizontal and vertical radii.
Does border-radius work in all browsers?
Yes. Supported everywhere modern CSS runs, including mobile Safari. Use longhand if mixed-unit shorthand gets ignored.