⬜ CSS Border Radius Generator
Runs entirely in your browser - no data sent to server
Output appears here...
📊 Key Data Points
4 corners
Each corner can have an independent radius value
border-radius: 50%
Standard circular avatar pattern — requires a square element
/ elliptical
Slash notation creates elliptical corners — separate h and v radius per corner
CSS Border Radius Generator -- Complete USA Guide 2026
CSS border-radius controls corner roundness with up to four independent radius values — one per corner — plus shorthand notation. The elliptical radius syntax (10px / 20px) adds a second dimension per corner for egg shapes and wave effects.
This generator provides visual corner controls and outputs the correct CSS shorthand. Runs in your browser.
**Long-tail searches answered here:** css border radius individual corners generator online free, css elliptical border radius tool, rounded corners CSS code generator with preview.
For complete component styling, pair with Box Shadow Generator.
🔬 How This Calculator Works
border-radius is a shorthand for four longhand properties: border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius. Each accepts 1-2 values: one value for circular corners, two values for elliptical corners.
The shorthand follows top-left, top-right, bottom-right, bottom-left clockwise order. Percentage values are relative to the element dimensions. border-radius: 50% produces a circle (for square elements) or an ellipse (for non-square elements).
✅ What You Can Calculate
Visual corner controls
Drag individual corner radius values and see the shape update in real time. Instant feedback for finding the exact radius.
All shorthand forms
Generates the most compact shorthand: 10px (all equal), 10px 20px (two-pair), or 10px 20px 30px 40px (all different).
Elliptical corner support
Generates the 10px / 20px elliptical radius syntax for asymmetric corner shapes. Used for organic, blob-like shapes.
Percentage values
Toggle between px and % values. Percentage border-radius on non-square elements produces ellipses rather than circles.
🎯 Real Scenarios & Use Cases
Button corner roundness
Most design systems have a standard button radius. A fully rounded pill button uses border-radius: 9999px. Build yours here and document the value.
Card component styling
Cards typically use 8-16px radius. Adjust here to match your design system, then combine with Box Shadow Generator.
Avatar and image circles
border-radius: 50% on a square element produces a circle — the standard pattern for avatar images.
Blob and organic shapes
Using different values per corner with elliptical radii creates organic blob shapes — common in modern landing page design.
💡 Pro Tips for Accurate Results
50% for circles, 9999px for pills. border-radius: 50% makes a circle only for square elements. 9999px always makes a pill regardless of element size.
Top-corners-only rounding. border-top-left-radius: 12px; border-top-right-radius: 12px — leave bottom corners at 0.
overflow: hidden for content clipping. Child content bleeds outside rounded corners without this.
Percentage on non-square. On a 200x100px element, 50% gives 100px horizontal and 50px vertical radius — an ellipse, not a circle.
🔗 Use These Together
🏁 Bottom Line
Border radius is one of the highest visual-impact CSS properties. This generator makes corner adjustment visual and generates the most compact shorthand. Complete component styling: Box Shadow Generator and CSS Gradient Generator.
What does the slash syntax mean in border-radius — like 10px / 20px?
The slash syntax creates elliptical corners. border-radius: 50px / 25px means horizontal radius = 50px, vertical radius = 25px for all corners — producing oval-shaped corners rather than circular ones. Without the slash, the single value applies equally to both axes (circular corners). The full 8-value syntax controls each corner axis independently: border-radius: top-left-h top-right-h bottom-right-h bottom-left-h / top-left-v top-right-v bottom-right-v bottom-left-v. This level of control lets you create leaf shapes, speech bubbles, and organic forms.
How do I make a perfect circle with border-radius?
Set border-radius: 50% on an element with equal width and height. The 50% refers to 50% of the element's dimensions on each axis, which on a square produces a circle. If width ≠ height, 50% produces an ellipse. For a circle that adapts to any square size: width: 100px; height: 100px; border-radius: 50%. For a fixed-size circle: border-radius: 50px (explicit px matching half the width/height). The percentage approach is more maintainable when dimensions change.
What are the four individual border-radius properties?
Instead of the shorthand, you can set corners individually: border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius. These accept one or two values: one value for circular, two space-separated values for elliptical (horizontal then vertical). Useful when overriding a single corner in a component theme or when a design requires only some corners to be rounded. The shorthand border-radius with 1-4 values uses the same TRBL (top, right, bottom, left) pattern as margin and padding.
How do I create a shape like a speech bubble with border-radius?
A rounded speech bubble combines border-radius with a CSS triangle pseudo-element. Set border-radius: 12px on the bubble container. Add ::after or ::before positioned absolutely at the speech tail location with border tricks (transparent borders on 3 sides, colored border on 1 side create a triangle). The triangle points in the direction of the transparent borders. Combine border-radius for the main bubble shape with the pseudo-element triangle for the tail. For complex organic shapes, CSS clip-path (the clip-path tool on this site) provides more control than border-radius alone.
What is the difference between border-radius in pixels and percentage?
Pixel values (border-radius: 8px) give a fixed radius regardless of element size. A 8px radius looks proportional on a large button but dominant on a small icon. Percentage values (border-radius: 10%) scale with the element — 10% of a 200px wide element = 20px radius. For cards and containers that resize: percentage makes the radius proportionally consistent. For design system tokens with specific intended corner radii: pixels are more predictable and match design tool outputs exactly. The 50% value for circles is the most common percentage use.
Can border-radius affect the click/touch area of an element?
No — border-radius is purely visual. The clickable area (hit test) of an element is always its rectangular bounding box, regardless of how rounded the corners appear. If a circle button (border-radius: 50%) is clicked in a corner, outside the visual circle, it still registers a click. For games or interactive UI where pixel-accurate click areas matter, use CSS pointer-events with SVG clip paths, or handle click position math in JavaScript. For typical UI buttons and cards, the rounded corners are small enough that the rectangular hit area is not perceptible.
What other CSS visual tools are on this site?
The Box Shadow Generator adds depth and elevation to elements with rounded corners — common in card UI design. The CSS Gradient Generator creates gradient backgrounds for rounded containers. The CSS clip-path Generator creates non-rectangular shapes beyond what border-radius supports. The Border Radius tool pairs with the Flexbox Generator for aligning card collections. The Color Contrast Checker verifies text readability inside rounded containers. All are in the Dev Tools CSS section.