Generate CSS border-radius with live preview
border-radius: 20px 20px 20px 20px;| Property / value | Example | Result |
|---|---|---|
| Equal all corners | border-radius: 8px | Uniformly rounded corners |
| Shorthand 2 values | border-radius: 8px 16px | top-left/bottom-right | top-right/bottom-left |
| Shorthand 4 values | border-radius: 4px 8px 12px 16px | top-left | top-right | bottom-right | bottom-left |
| Pill shape | border-radius: 9999px | Fully rounded ends (button pill) |
| Circle | border-radius: 50% | Perfect circle on square element |
| One corner only | border-top-left-radius: 16px | Single corner rounded, others sharp |
| Elliptical corners | border-radius: 50% / 30% | Different horizontal and vertical radii |
| rem units | border-radius: 0.5rem | Scales with root font size (accessible) |
The border-radius property applies to the background, border, and box-shadow — not the content itself. If your element has a background image, the image is clipped to the rounded shape. Use overflow: hidden on a parent if you need child content (like an image inside a card) to also respect the rounded corners. For pill-shaped buttons, border-radius: 9999px (or any sufficiently large value) is more reliable than 50%, which creates an ellipse on non-square elements rather than rounded ends.
Common questions about Border Radius Generator