About Border Radius Generator
Drag a slider per corner and watch a box on the preview change shape. Work in pixels for buttons and cards, or in percent for shapes that scale with their element, such as circles, pills and leaves.
Switch on elliptical corners to give every corner its own vertical radius as well, which is how egg shapes, tabs and organic outlines are made. The tool writes the shortest shorthand the values allow, plus the four longhand declarations if you prefer to set corners one at a time.
How it works
- The four corners are written in CSS order (top left, top right, bottom right, bottom left) and then shortened the way the shorthand allows, for example "10px 0" when opposite corners match.
- With elliptical corners on, the horizontal radii come first and the vertical radii follow a slash. If both lists turn out the same, the slash part is left out.
- Values are passed through as you set them. When two corners on one side add up to more than the side is long, the browser scales them down together, exactly as the preview shows.
Questions
What does a percentage radius measure against?
A horizontal radius in percent is a share of the element’s width, and a vertical one a share of its height. That is why 50% on every corner makes a circle on a square and an ellipse on a rectangle.
Why does my corner stop getting rounder?
When neighbouring corners on the same side together exceed that side’s length, browsers reduce all radii by the same factor so the curves meet without overlapping. The preview shows the same thing.
Does the preview size affect the CSS?
No. Width, height and the colors are only there to judge the shape. Only the radius is copied.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.