Rounded corners change how a design feels. Small radii (4–8px) look precise and businesslike; larger ones (16–24px) feel friendly and modern; full pills suit tags and buttons. This generator lets you test those choices on a real shape and gives you the shortest CSS that produces it.
Corners mode
Each corner has its own slider, in the order CSS uses: top left, top right, bottom right, bottom left. When two or more corners match, the output uses the shorter form, so you get border-radius: 24px 0 rather than four repeated values. Some practical shapes:
- Tab: round only the top two corners for a browser-style tab.
- Speech bubble: keep one corner square to point at the speaker.
- Leaf: round two opposite corners for a soft, organic badge.
Blob mode
The full border-radius syntax takes eight values: four horizontal radii, a slash, then four vertical radii. When the horizontal pair along an edge adds up to 100%, the curves meet smoothly, which gives the rounded, pebble-like shapes popular behind illustrations and profile photos. The sliders handle that maths for you: each one moves the point where two curves meet along one edge.
Animating shapes
Browsers can animate between two border-radius values. Tick Animate between shapes to watch a blob morph every couple of seconds. In your own CSS, a slow transition or @keyframes on border-radius gives the same gentle movement, with no JavaScript needed.
How to use the Border Radius Generator
- In Corners mode, drag the slider for each corner. Untick Same value for all corners to set them separately.
- Choose px or % as the unit, or click a preset such as Pill, Leaf or Tab.
- Switch to Blob shape and drag the four sliders, or click Random blob.
- Resize the preview box to check how the shape behaves at other sizes.
- Click Copy CSS.
Features
- Per-corner radius in px or %, with the shortest valid shorthand in the output.
- Blob mode using the elliptical
a b c d / e f g hsyntax. - Random blob generator, with an optional smooth animation between shapes.
- Presets: square, rounded, pill, leaf, tab and speech bubble.
- Adjustable preview width and height.
Frequently asked questions
What is the difference between px and % for border-radius?
Pixels give the same curve whatever the element’s size. Percentages scale with the element: 50% on a square makes a circle, and on a rectangle it makes an ellipse.
How do I make a pill-shaped button?
Use a radius larger than half the button’s height. The common trick is border-radius: 999px, which always gives fully round ends without having to know the height.
What does the slash in border-radius mean?
Values before the slash set the horizontal radius of each corner, and values after set the vertical radius. Different horizontal and vertical radii give elliptical corners, which is how blob shapes are made.
Does border-radius clip images and backgrounds?
Backgrounds and borders follow the curve automatically. For child elements such as an image inside a card, add overflow: hidden to the card so they are clipped too.
Written by Dewan Razib