RevealTheme logo

CSS Border Radius Generator

Set the four corners of a CSS border-radius with sliders and copy the generated declaration. Each corner is controlled independently in pixels.

border-radius: 20px 20px 20px 20px;

How to use this tool

  1. 1

    Drag the TL, TR, BR, and BL sliders to set each corner radius in pixels (0 to 100).

  2. 2

    Watch the indigo preview box update live as you change each corner.

  3. 3

    Read the generated border-radius declaration in the code box below the sliders.

  4. 4

    Click Copy CSS to put the declaration on your clipboard, then paste it into your stylesheet.

What is the CSS border-radius shorthand?

The border-radius property rounds the corners of an element's box. When you give it four values, the browser maps them clockwise to the top-left, top-right, bottom-right, and bottom-left corners — the exact TL, TR, BR, BL order this tool exposes through its four sliders. Each value defines the radius of a quarter-circle that the corner follows: a larger radius cuts a bigger curve, and a value of zero leaves a square corner. The declaration this generator outputs, such as 'border-radius: 20px 20px 20px 20px;', uses pixel units, so the curve stays the same physical size regardless of the element's dimensions. The full CSS specification allows much more than this: percentage values that scale with the box, separate horizontal and vertical radii written with a slash to make elliptical corners, and the individual longhand properties like border-top-left-radius. This tool deliberately covers the common case — four equal-or-different pixel corners — and does not generate percentages, elliptical (slash) syntax, or longhand. It is a fast way to dial in a shape visually and grab clean, paste-ready CSS rather than a complete editor for every border-radius feature.

Common use cases

  • Rounding the corners of a card or panel component and copying the exact pixel value into a stylesheet.

  • Creating an asymmetric shape, like a chat bubble, by giving one corner a small radius and the others a larger one.

  • Prototyping a pill or capsule button by pushing all four sliders toward their maximum.

  • Matching a design spec that calls for different radii on the top corners versus the bottom corners.

  • Quickly testing how a corner radius looks at different pixel sizes before committing a value to a design system.

  • Teaching or demonstrating how the four-value border-radius shorthand maps to each corner.

Frequently asked questions

What unit does this tool output?
Pixels only. Each slider ranges from 0 to 100 and the generated declaration writes every corner in px, for example 'border-radius: 16px 40px 16px 40px;'. It does not produce percentages or other units.
Can it generate elliptical corners with the slash syntax?
No. CSS supports two radii per corner separated by a slash to make elliptical curves, but this tool emits a single value per corner, which always produces circular quarter-curves. For elliptical corners you would edit the CSS by hand.
What order are the four corners in?
Top-left, top-right, bottom-right, bottom-left — the standard clockwise order of the CSS shorthand. The sliders are labeled TL, TR, BR, and BL to match.
What is the maximum radius I can set?
100px per corner, the upper bound of each slider. To make a perfect circle or a fully rounded pill you may need a larger value than 100px in your own CSS, depending on the element's size.
Is my data uploaded anywhere?
No. The generator runs entirely in your browser. The slider values, the preview, and the generated CSS never leave your device, and Copy CSS only writes to your local clipboard.
Why does my real element look different from the preview?
The preview is a fixed 192px square. Because the radii are in pixels, the same value produces a relatively larger curve on a small element and a smaller-looking curve on a large one. Adjust the values against your actual element size.

Related tools