CSS Border Radius Generator

Create rounded corners visually with a live preview. Adjust each corner individually or link all corners. Choose pixel or percentage values. Customize box size, background, and border colors -- then copy the CSS code.

220px
220px
20px
20px
20px
20px
Presets
Generated CSS

          
        

How It Works

Live Preview

See your border radius update in real time as you drag the sliders. The preview box shows exactly how the rounded corners will look, letting you fine-tune visually.

🔗

Link/Unlink Corners

Toggle between linked mode (all corners the same) and unlinked mode (each corner independent). Create uniform rounding or unique asymmetric shapes.

📋

px or % Units

Switch between pixel and percentage values. Percentages are great for responsive design since the radius scales with the element's dimensions.

Presets & Copy

Choose from built-in presets like Circle, Pill, Rounded, and creative shapes. Copy the shorthand or longhand CSS with one click.

Understanding CSS Border Radius

The CSS border-radius property defines the radius of an element's corners, creating rounded corners. It is one of the most commonly used CSS properties for creating modern, polished UI designs. From subtle corner rounding on cards to creating circles and pill-shaped buttons, border-radius is essential for contemporary web design.

Border Radius Syntax

The border-radius shorthand accepts 1 to 4 values: border-radius: top-left top-right bottom-right bottom-left. With 1 value, all corners are the same. With 2 values, the first applies to top-left/bottom-right and the second to top-right/bottom-left. With 3 values, the first is top-left, the second is top-right/bottom-left, and the third is bottom-right.

Pixels vs Percentages

Pixel values create a fixed radius. A 10px radius always rounds the corner by exactly 10 pixels regardless of the element's size. Percentage values are relative to the element's width and height. Setting border-radius: 50% on a square element creates a perfect circle. Percentages are ideal for responsive designs.

Common Use Cases

Frequently Asked Questions

What is CSS border-radius?
The CSS border-radius property rounds the corners of an element's outer border edge. You can set all four corners to the same value or specify different values for each corner (top-left, top-right, bottom-right, bottom-left).
How do I make a circle with border-radius?
Set border-radius: 50% on a square element (equal width and height). For example: width: 200px; height: 200px; border-radius: 50%;. If the element is not square, 50% creates an ellipse.
What is the difference between px and % for border-radius?
Pixel values create a fixed radius regardless of element size. Percentage values are relative to the element's dimensions -- 50% creates a circle on a square element. Percentages scale with the element, making them ideal for responsive designs.
Can I set different radius for each corner?
Yes, use the shorthand with four values: border-radius: 10px 20px 30px 40px (top-left, top-right, bottom-right, bottom-left). Or use longhand properties like border-top-left-radius for individual control. Click "Unlink" in our tool to adjust corners independently.
What is the border-radius shorthand syntax?
The shorthand accepts 1-4 values: 1 value sets all corners; 2 values set top-left/bottom-right and top-right/bottom-left; 3 values set top-left, top-right/bottom-left, bottom-right; 4 values set each corner individually (clockwise from top-left).
How do I copy the generated CSS?
Click the "Copy CSS" button below the code output. Both shorthand and longhand CSS are displayed. The code updates in real time as you drag the corner sliders or select presets.

Explore More Developer Tools

Check out our other free CSS tools. Generate box shadows, gradients, flexbox layouts, and more -- all from your browser with no sign-up required.

Box Shadow Generator →
Copied to clipboard!