Border Radius Generator with a Live Preview
Set each corner on its own or lock all four together, check the preview, and copy the border-radius rule.
Use this tool in your browser without installing software.
About this tool
Set each corner’s radius with its own slider and see the result in the preview. With the “all four corners” lock on, changing any slider updates all four corners. Start from any of the six presets. The border-radius rule uses the shortest valid form: one value when all four corners match, two when both pairs of opposite corners match, three when only the top-right and bottom-left corners match, and otherwise four values in top-left, top-right, bottom-right, bottom-left order.
How to use it
- 1
Pick a preset, or turn the lock off and set each corner on its own.
- 2
Check the card preview and fine-tune the values if you need to.
- 3
Copy the border-radius rule into your own element.
If the answer looks wrong
- The corners stay square.
border-radius rounds the element itself but does not clip its children. If an image or a child background spills past the corner, add overflow: hidden to the parent.
- I change a number but the rule stays the same.
The four-corner lock is on and keeps every corner equal. Turn it off to set corners independently.
- The card will not become a pill.
The value has to reach half the box height. If the box is short, pick the pill preset or raise the corner values.
Frequently asked questions
In what order do the four border-radius values go?
Top-left, top-right, bottom-right, then bottom-left. With two values, the first covers top-left and bottom-right and the second covers top-right and bottom-left. A single value rounds all four corners the same way.
Why is the output sometimes one value and sometimes four?
CSS lets you omit repeated values. One value is enough when all corners match, two when both opposite pairs match, and three when only the top-right and bottom-left corners match. Otherwise, all four values are shown.
What does the four-corner lock do?
While it is on, changing one corner copies that value to the other three, which suits adjusting the overall roundness. Turn it off to keep each corner separate. Choosing an asymmetric preset turns the lock off automatically.
How do I get a full circle or a pill?
A corner turns into a pill once it reaches half the shorter side of the box; the pill preset does that here. For a true circle, replace the value in the output with 50%, which is calculated from the element size and gives a circle on a square element.
What happens when a value is larger than half the box?
The browser scales overlapping corners down proportionally so the shape stays valid, which is why raising the number past a point stops changing the look. Keep the value near half the shorter side for predictable results.