CSS Border Radius Generator: Perfect Rounded Corners Every Time

Master rounded corners, pill shapes, and organic forms with visual CSS tools

CSS Design 📅 April 13, 2026 ⏱ 8 min read

Rounded corners are one of those design details that seem simple but have a profound impact on how a website feels. Sharp, square corners can look harsh and clinical, while well-proportioned rounded corners feel approachable, modern, and polished. The border-radius property gives you precise control over corner curvature, from subtle softening to full circles and complex asymmetric shapes.

However, getting the exact radius you want — especially when different corners need different values — often involves a lot of back-and-forth between your editor and the browser. A CSS border radius generator eliminates this friction by letting you drag handles, preview results in real time, and copy the final CSS with a single click. This guide covers everything from basic syntax to advanced techniques that will help you use border-radius like a pro.

The Border Radius Syntax Explained

The border-radius property is deceptively flexible. At its simplest, a single value rounds all four corners equally:

border-radius: 8px;

But the property also supports the four-value shorthand pattern familiar from margin and padding:

border-radius: 12px 4px 12px 4px;
/* top-left | top-right | bottom-right | bottom-left */

You can also use two-value shorthand where the first value sets the top-left and bottom-right corners, and the second sets the top-right and bottom-left:

border-radius: 16px 8px;
/* top-left & bottom-right | top-right & bottom-left */

For maximum control, each corner has its own longhand property:

border-top-left-radius: 20px;
border-top-right-radius: 0;
border-bottom-right-radius: 20px;
border-bottom-left-radius: 0;

Elliptical vs. Circular Corners

What many developers do not realize is that each corner radius can actually have two values — one for the horizontal axis and one for the vertical axis. This creates elliptical rather than circular corners:

border-radius: 20px / 10px;
/* horizontal radius / vertical radius */

The first value (20px) controls the horizontal curve, and the second (10px) controls the vertical curve. This is particularly useful for creating organic, blob-like shapes that would be impossible with circular corners alone.

You can even set different elliptical values for each corner:

border-radius: 30px 10px 30px 10px / 15px 30px 15px 30px;

This level of control opens up creative possibilities that most developers never explore, but it is worth experimenting with for hero sections, decorative elements, and creative layouts.

Common Border Radius Patterns

The Subtle Soften (4-8px)

A small border-radius (4-8px) takes the hard edge off rectangular elements without dramatically changing their shape. This is the most versatile range and works well for cards, buttons, input fields, and containers. It adds polish without calling attention to itself.

The Modern Card (12-16px)

The 12-16px range has become the de facto standard for card components in modern UI design. It is large enough to feel distinctly rounded but small enough to maintain a clean, structured appearance. If you are unsure what radius to use for a card, 12px is a safe default.

The Pill Shape (9999px or 50%)

Using an extremely large value like 9999px on the shorter sides of a rectangle creates a pill shape — fully rounded ends with straight parallel sides. This is the go-to style for tags, badges, and pill-shaped buttons. The 9999px trick works because the browser automatically caps the radius at half the element's smaller dimension.

.pill-button {
  border-radius: 9999px;
  padding: 8px 24px;
}

The Circle (50%)

Setting border-radius: 50% on a square element creates a perfect circle. This is the standard technique for avatar images, icon containers, and decorative dots. The percentage is calculated relative to the element's dimensions, so it works regardless of the element's actual size.

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

Asymmetric Corners

Applying different radius values to different corners creates distinctive shapes that stand out from typical UI patterns. A card with only the top corners rounded, for example, can be used at the bottom of a section where the bottom edge should blend seamlessly with the background.

.card-top-rounded {
  border-radius: 16px 16px 0 0;
}

Using a Border Radius Generator

While the syntax is straightforward, visualizing the result of different radius combinations is much easier with an interactive tool. Here is how to get the most out of a CSS border radius generator:

Step 1: Set the Element Size

Start by setting the width and height of your element in the generator. The visual result of a given border-radius value depends heavily on the element's proportions. A 20px radius on a 200x200 element looks very different from the same radius on a 200x50 element.

Step 2: Adjust Individual Corners

Most generators provide four draggable handles or input fields, one for each corner. Drag or type values to experiment with different combinations. Some generators also support the elliptical mode where you can set separate horizontal and vertical radii.

Step 3: Preview and Refine

Watch the preview update in real time as you adjust. Pay attention to how the shape changes — small adjustments can have a big visual impact. When you are satisfied, copy the generated CSS and paste it into your project.

🔲 Try Our Free Border Radius Generator

Visually adjust each corner and copy production-ready CSS in one click.

Open Border Radius Generator →

Border Radius with Images

Applying border-radius to images is a common task, but there are two approaches with different implications.

Direct approach: Apply border-radius directly to the <img> element. This works in most cases but can cause issues if the image fails to load — the rounded container will still be visible but empty.

img.rounded {
  border-radius: 16px;
}

Container approach: Wrap the image in a div with overflow: hidden and apply the border-radius to the container. This is more robust because the clipping is handled by the container, and it works reliably with dynamically loaded images.

.image-container {
  border-radius: 16px;
  overflow: hidden;
}
.image-container img {
  width: 100%;
  display: block;
}

Border Radius and Overflow

One common gotcha is that border-radius does not automatically clip child content. If an element has rounded corners but its child extends beyond those corners, the child will be visible outside the rounded area. The fix is to add overflow: hidden to the parent element.

This is especially important when using border-radius with backgrounds, gradients, or child elements that have their own backgrounds or borders. Without overflow control, the rounded shape becomes purely cosmetic.

Responsive Border Radius

Fixed pixel values work well at specific viewport sizes, but they can look disproportionate on very small or very large screens. For truly responsive designs, consider using relative units:

Border Radius and Performance

Border radius has minimal performance impact in most cases. The browser renders rounded corners using the GPU, and the cost is negligible for typical UI elements. However, there are a few edge cases to be aware of:

Creative Techniques

The Blob Shape

By using large, asymmetric elliptical radius values, you can create organic blob shapes that are popular in modern illustrations and decorative backgrounds:

.blob {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

The Chat Bubble

Using border-radius with clip-path or pseudo-elements, you can create chat bubble shapes with a pointed tail — a common pattern in messaging interfaces.

The Ticket or Coupon

Combine border-radius with radial-gradient cutouts to create the scalloped edge effect seen on tickets and coupons. This is a clever technique that uses CSS-only for what would traditionally require an SVG or image.

Frequently Asked Questions

What is CSS border-radius?

CSS border-radius is a property that rounds the corners of an element. It accepts length values (px, em, rem, %) and can be applied uniformly to all corners or individually using the shorthand or longhand properties.

How do I make a circle with border-radius?

Apply border-radius: 50% to a square element (equal width and height). The 50% value makes each corner's radius half the element's size, creating a perfect circle. On non-square elements, 50% creates an ellipse.

Can border-radius be different for each corner?

Yes. The shorthand border-radius: TL TR BR BL sets each corner independently. You can also use longhand properties like border-top-left-radius for individual control.

Does border-radius work with images?

Yes. Apply it directly to the img element or use a container with overflow: hidden. The container approach is more robust for dynamically loaded images.

What is the maximum border-radius value?

There is no fixed maximum. When the radius exceeds half the element's smaller dimension, the browser automatically caps it. This is why border-radius: 9999px and border-radius: 50% often produce identical pill shapes.

Conclusion

Border radius is a foundational CSS property that directly influences how users perceive the quality and intentionality of your design. From subtle corner softening to creative blob shapes, the range of effects is broad and the syntax is well-supported across all modern browsers. Using a CSS border radius generator lets you experiment freely without the overhead of manual trial and error. Pick your radius, refine your shape, and let rounded corners bring a touch of polish to every element on your page.

Related Articles