CSS border-radius generator
What is a Css Border Radius Generator?
The CSS border-radius property rounds the corners of an element. Beyond simple rounded rectangles, it can produce circles, pills, leaf shapes and organic blobs by giving each corner different horizontal and vertical radii. This generator lets you adjust every corner visually and copy the resulting CSS.
How to use it
- Adjust the radius for each corner, or link them for uniform rounding.
- Switch to elliptical mode to set separate horizontal and vertical radii.
- Copy the generated declaration.
Syntax explained
border-radius: 12px;rounds all four corners equally.border-radius: 12px 0 12px 0;sets top-left, top-right, bottom-right, bottom-left (clockwise).border-radius: 50%;on a square makes a circle.border-radius: 9999px;makes pill-shaped buttons regardless of width.- The slash syntax separates horizontal and vertical radii:
border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;creates an organic blob.
Tips
- Percentages are relative to the element's width (horizontal radii) and height (vertical radii), so the same percentage gives different curves on non-square elements.
- If radii add up to more than the side length, browsers scale them down proportionally, which is why very large pixel values produce perfect pills.
- Content is not clipped by border-radius unless you also set
overflow: hidden, which matters for images inside rounded cards. - Animate blob shapes by transitioning between two border-radius values for a soft morphing effect.
Frequently Asked Questions
How do I make a circle with CSS?
Give an element equal width and height and set border-radius to 50 percent.
What does the slash in border-radius mean?
Values before the slash are horizontal radii and values after it are vertical radii, which creates elliptical corners.
Why is my image not clipped by the rounded corners?
Add overflow: hidden to the container, or apply the border-radius directly to the image.
How do I make pill-shaped buttons?
Use a very large radius such as 9999px. Browsers scale it down to half the height, giving fully rounded ends.