CSS Border Radius Generator

Drag the sliders and copy the CSS. Each corner is independent, or link them to move together, in pixels, percentages or rems. The output is collapsed the way you would write it by hand — one value when all four corners match, two when the diagonals do — rather than four values every time. Switch on elliptical corners for the syntax most generators skip: every corner can take a horizontal and a vertical radius, written as four values, a slash, then four more. Different values on the two axes curve the corner into an ellipse instead of a circle, which is how the organic blob shapes in modern designs are actually made.

Shorthand meanings

ValueApplies to
8pxAll four corners
8px 4pxTop-left and bottom-right, then the other two
8px 4px 2pxTop-left, both side corners, bottom-right
8px 4px 2px 0Clockwise from top-left
30% 70% / 60% 40%Horizontal radii, then vertical — an ellipse

When to use it

  1. Round the corners of a card or button to an exact value.
  2. Make a pill shape or a perfect circle.
  3. Round only the top corners of a header or tab.
  4. Build an organic blob shape with elliptical corners.
  5. Get the shorthand for a set of corners you already have.

How to Use

  1. Drag the corner sliders, or link them to move together.
  2. Switch on elliptical corners for blob shapes.
  3. Copy the generated CSS.

Features

  1. Per-corner control, or all four linked
  2. Pixels, percentages or rems
  3. Elliptical corners with the slash syntax
  4. Output collapsed to proper shorthand
  5. Live preview as you drag
  6. Runs entirely in your browser

FAQs

What does the slash in border-radius mean?

It separates horizontal radii from vertical ones. border-radius: 30% 70% / 60% 40% gives each corner two different radii, curving it into an ellipse rather than a circle. It is the least-known part of the property and the reason blob shapes are possible in plain CSS.

Should I use pixels or percentages?

Percentages are relative to the element's own size, so the shape scales with the box — 50% is a circle at any size. Pixels stay fixed, which is what you want for a consistent corner across differently sized cards. A pixel radius larger than half the element is clamped, which is why a big pixel value eventually looks like a pill.

How do I make a perfect circle?

border-radius: 50% on an element with equal width and height. On a rectangle, 50% gives an ellipse instead, which is often what you actually want for an avatar crop.

Why does the output sometimes have fewer than four values?

Because CSS shorthand allows it and it is what people write. One value applies to all corners, two set the diagonals, three set top-left, then both side corners, then bottom-right. The result is identical, just shorter.

In what order do the four values go?

Clockwise from the top left: top-left, top-right, bottom-right, bottom-left. The same order as margin and padding, starting from a different corner.

Technical Details

The output is collapsed using CSS's own shorthand rules rather than always writing four values, because the shorthand is what a person would type: one value when all four corners match, two when the diagonals do, three when only the two side corners agree, four otherwise. A zero is written bare rather than as 0px, for the same reason — nobody hand-writes 0px. The elliptical form is where this differs from most generators. Every corner can take two radii, a horizontal and a vertical, written as four values, a slash, then four more: border-radius: 30% 70% / 60% 40%. Different values on the two axes curve the corner into an ellipse instead of a circle, which is how the organic blob shapes people want are actually made — and the syntax is obscure enough that most generators skip it entirely. Each side of the slash collapses independently, and the slash is dropped altogether when both sides match, since an unnecessary slash is valid and nobody writes it. Percentage radii are relative to the element's own dimensions, so a percentage-based shape scales with the box while a pixel one does not — which is why 50% gives a circle at any size and 200px gives a circle only above a certain size.

Web & CSS Tools

Web & CSS Tools

  • CSS Box Shadow Generator
  • Cubic Bezier Generator
  • CSS Clip Path Generator
  • CSS Keyframes Generator
  • CSS Unit Converter
  • Layout Grid Calculator
  • Design Tokens Converter
  • SVG Sprite Builder