Four corner sliders to CSS code, elliptical slash syntax included.
border-radius: 16px;
📐 Corner order is clockwise from top left: TL TR BR BL. The elliptical form takes horizontal / vertical radii separated by a slash — 50% / 50% with equal pairs renders a perfect ellipse. Percentages reference the box side they sit on, which is why blobs survive resizing better than pixel values.
The Border Radius Generator is based on the following formula:
border-radius: hTL hTR hBR hBL [ / vTL vTR vBR vBL ] Collapse: all 4 equal → 1 value; hTL=hBR & hTR=hBL → 2; hTR=hBL → 3 % radii resolve against the side they touch (h → width, v → height)
Variables: hTL..hBL = Horizontal radii, clockwise from top left vTL..vBL = Vertical radii (present only with the slash syntax) Unit = px (fixed) or % (of the touched side)
Corner order runs clockwise from the top left. CSS lets matching values collapse, and the generator always prints the shortest valid declaration, appending the vertical group after a slash for elliptical corners.
Worked example: Step 1: All four corners 16px → all equal → border-radius: 16px. Step 2: TL=12, TR=16, BR=12, BL=16 → diagonals pair up (12/12 and 16/16) → border-radius: 12px 16px. Step 3: Elliptical blob: horizontal 30% 70% 70% 30%, vertical 30% 30% 70% 70% → no collapsing applies → border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%. Result: the exact strings this generator emits for those inputs.
CSS applies border-radius values clockwise starting at the top left: TL TR BR BL — the opposite diagonal order from margin/padding shorthand (which goes TL TR BR BL too, but people still mistype BL and BR). When TR equals BL you may omit it, and when both diagonals pair up the declaration collapses to two values; all four equal collapses to one.
A single value per corner gives a circular arc. The slash syntax — border-radius: 30% 70% 70% 30% / 30% 30% 70% 70% — sets horizontal radii before the slash and vertical radii after it, so each corner can be a true ellipse. This is how organic "blob" shapes and leaf shapes are built.
Percentages resolve against the side they touch: 50% horizontal on a 400×200 box is 200px on the top and bottom edges but only 100px on the left and right, which is why 50% everywhere turns any rectangle into an ellipse. Pixels stay fixed while the box resizes and corners stop looking designed — fluid layouts prefer %, fixed-size components prefer px.
12-16px reads as a modern card; 999px is the pill idiom (any radius at least half the shorter side fully rounds it); a squircle uses ~28% for a softer iOS feel; tickets and blobs combine asymmetric horizontal and vertical radii. Preview at the real size you will ship — 24px reads differently on a 40px chip than on a 400px card.
More tools you might find useful
Test color contrast against WCAG AA and AAA accessibility levels.
Convert between HEX, RGB, and HSL with a visual picker.
One base color to five harmony schemes, each swatch in hex/rgb/hsl.
Generate fluid font sizes with CSS clamp().