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
Drag the TL, TR, BR, and BL sliders to set each corner radius in pixels (0 to 100).
- 2
Watch the indigo preview box update live as you change each corner.
- 3
Read the generated border-radius declaration in the code box below the sliders.
- 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?▼
Can it generate elliptical corners with the slash syntax?▼
What order are the four corners in?▼
What is the maximum radius I can set?▼
Is my data uploaded anywhere?▼
Why does my real element look different from the preview?▼
Related tools
Color Converter (HEX/RGB/HSL)
Convert colors between HEX, RGB, HSL, OKLCH.
CSS Box Shadow Generator
Build CSS box-shadow visually.
CSS Gradient Generator
Build linear and radial CSS gradients.
Cubic Bezier Generator
Build CSS easing curves visually.
Color Palette Generator
Generate harmonious color palettes from any base color.
CSS Clamp Generator
Generate responsive CSS clamp() functions.