Rounded corners, done by eye
Border radius looks simple until you want a leaf shape, a pill or a blob. Then you're typing eight numbers and a slash and guessing. This visualizer lets you drag sliders for each corner and see the shape change, then copy the CSS.
It supports the full syntax, including the slash for elliptical corners, where the horizontal and vertical radii differ.
Pixels or percentages
A pixel radius stays the same size no matter the box. A percentage scales with the element. 50 percent on a square gives a circle. On a rectangle it gives an oval.
Use pixels for buttons and cards, where you want the same softness everywhere. Use percentages for shapes that must follow the box.
Common shapes
Presets in the tool give you a start. Adjust from there instead of building from zero.
- Circle: equal width and height, border-radius 50%
- Pill: a large radius, such as 9999px, on a wide box
- Leaf: two opposite corners round, the others square
- Blob: different elliptical values on each corner
What if the radius is too big
Browsers scale all radii down proportionally so they never overlap. So 9999px on a pill is safe. You won't break the layout.
You can animate border-radius with a transition. It's smooth, though large animated blurs and shadows on top can slow low-end phones. Keep effects light.
Browser support
Every current browser supports border-radius, including the slash syntax. No prefixes needed. Copy the shorthand and paste it in. Nothing you set is sent anywhere.
Building shapes from one property
Rounded corners can do more than soften a box. Set the radius to 50 percent on a square and you get a circle. On a rectangle you get an ellipse. Give a wide rectangle a radius equal to half its height and you get a pill, the classic shape for buttons and tags.
Mix values per corner and you get leaf shapes, speech bubbles and blobs. A shape like 30% 70% 70% 30% / 30% 30% 70% 70% looks organic, and it needs no image. The slash separates horizontal and vertical radii, which is how you get elliptical corners.
Drag the handles until it looks right, then copy the line.
Design habits that hold up
Keep radii consistent across a site. Pick two or three sizes, say 4, 8 and 16 pixels, and reuse them. Random radii make a layout feel unfinished.
Nested rounded boxes need smaller inner radii. If the outer radius is 16 and the padding is 8, the inner element should be near 8. Otherwise the gap between the curves looks uneven.
Remember overflow. A rounded container doesn't clip its children unless overflow is hidden, so square images can poke out of the corners.
Radius in real components
Cards usually sit between 8 and 16 pixels. Buttons range from 4 for a sharp look to full pills. Avatars use 50 percent. Pick a scale and apply it to every component, so the site feels like one design.
On inputs, keep radii smaller than on cards. Chunky rounded fields look childish in business apps.