Shapes
border-radius: 24px;
Mode
Unit
How to use
Choose a mode and unit
Pick All corners, Per corner or Elliptical, then choose px, % or rem. Or press a shape preset such as Pill, Tab, Egg or Blob, or Random blob.
Drag the handles or sliders
Drag the blue handles along the edges for horizontal radii and the orange ones for vertical radii, or use the sliders and number fields. Set the preview size, fill and an optional border.
Copy the code
Pick the CSS, Longhand, Tailwind or SCSS tab and press Copy. Copy share link saves the shape and border in a URL.
Why CSS Border Radius Generator
- Three modes: all corners, per corner and elliptical 8-value radii.
- Drag handles on the shape, plus sliders and number fields in px, % or rem.
- Twelve shape presets and a Random blob button for organic shapes.
- Preview size, fill and border options, with CSS, longhand, Tailwind and SCSS output.
border-radius shorthand forms
The shorthand can take one to four values, and an optional slash with a second set for vertical radii. Values run clockwise from the top-left corner, and any value that is left out copies the value from the opposite corner. The generator always writes the shortest form that gives the same shape, and writes 0 without a unit.
Each corner also has its own longhand property, such as border-top-left-radius, which takes one value or a horizontal and vertical pair.
| Value | Top-left | Top-right | Bottom-right | Bottom-left |
|---|---|---|---|---|
| 16px | 16px | 16px | 16px | 16px |
| 16px 0 | 16px | 0 | 16px | 0 |
| 16px 8px 0 | 16px | 8px | 0 | 8px |
| 16px 8px 4px 0 | 16px | 8px | 4px | 0 |
| 50% / 30% | 50% wide, 30% tall | 50% wide, 30% tall | 50% wide, 30% tall | 50% wide, 30% tall |
Blob and organic shapes with 8-value border-radius
Blob shapes come from giving each corner a different horizontal and vertical radius in percent. The value 30% 70% 70% 30% / 30% 30% 70% 70% is a common starting point: the top edge splits 30 and 70, the right edge splits 30 and 70, and so on.
The trick for smooth edges is to make the two radii that meet on each side add up to 100%. On the top edge, top-left horizontal plus top-right horizontal equals 100%. When they add up to less, a straight segment appears; when they add up to more, the browser scales every radius down and the shape gets rounder.
Blobs work well for avatar frames, decorative backgrounds and image masks. To animate one, transition border-radius between two blob values; browsers interpolate each of the eight numbers. Keep the element square if you want the shape to look the same as in the default preview.