Border Radius Generator
Set each corner's border radius independently and see the shape update live, then copy the CSS.
How it works
Four sliders, one per corner, each firing on input. With "link all corners" on, moving any
slider copies its value to the other three before the CSS is rebuilt. The values are
assembled into the shorthand in the order CSS actually uses, clockwise from top-left:
top-left, top-right, bottom-right, bottom-left. That same string is written straight onto
the preview box's style.borderRadius, so the preview isn't an approximation of
the output, it literally is the CSS you copy, rendered by your own browser.
Two behaviors worth knowing that the sliders can't show you directly. First, this tool uses
pixels, and pixels behave differently from percentages: border-radius: 50% on
a rectangle resolves against each axis separately and gives you an ellipse, while a big
pixel value like 9999px gives you the pill shape people usually wanted. Second,
the spec clamps overlapping radii: when the radii on a side add up to more than that side's
length, the browser scales all of them down proportionally. That's why cranking every
slider to 100 on a small box eventually stops changing the shape, and it's also why you
never need to compute "half the height" exactly for a pill; overshoot and the browser
clamps it for you.
The whole tool is a few dozen lines of JavaScript running in this page. Slider values go from the DOM to the preview element and back to the output box without any network activity, which you can confirm in the DevTools Network tab.
Common questions
What's the difference from just setting one border-radius value?
A single value rounds all four corners equally. This tool lets you set each corner independently, useful for effects like a card with only its top corners rounded, or an asymmetric "blob" shape.
What units does this use?
Pixels. If you need percentage-based radii (for perfect circles/ellipses regardless of element size), you'd adjust the generated CSS manually, swap px for % on each value.
Is this sent anywhere?
No, the preview and CSS are generated entirely in your browser. Nothing is uploaded.