Free CSS Border Radius Generator

Quick Answer

What CSS border-radius value creates a perfect circle?

To create a perfect circle with CSS, set border-radius: 50% on an element with equal width and height (e.g. width: 100px; height: 100px; border-radius: 50%). For a pill/capsule shape on a rectangle, use border-radius: 9999px. For individual corners: the four-value shorthand follows clockwise order — top-left, top-right, bottom-right, bottom-left (TRouBLe mnemonic). For an elliptical corner, use the slash syntax: border-radius: 40px / 20px.

Free CSS Border Radius Generator — create rounded corners with live preview

Visually create complex or simple rounded corners for your web elements. Adjust top, right, bottom, and left radii independently or lock them together, and get cross-browser compatible CSS code instantly.

Border Radius Settings
16px
16px
16px
16px
Preview & Code
Preview

The border-radius shorthand most developers get wrong

border-radius accepts 1–4 values using the same TRouBLe (top-right-bottom-left) clockwise order as margin and padding — but with a twist. The property actually sets 8 values: the horizontal and vertical radii of each corner independently. The slash syntax separates them: border-radius: 40px 10px / 20px 5px sets top-left and bottom-right corners to 40px horizontal / 20px vertical, and top-right and bottom-left to 10px horizontal / 5px vertical — producing an elliptical corners effect that's impossible with single values.

The common case — uniform rounded corners — is just one value: border-radius: 8px. Setting border-radius: 50% on a square element makes a perfect circle. On a non-square element (e.g., a wide button), 50% produces an ellipse — use border-radius: 9999px for a consistent pill shape regardless of dimensions.

Quick reference for common shapes

ShapeCSSNotes
Slightly rounded cardborder-radius: 6pxStandard card in most design systems
Rounded card (Material)border-radius: 12pxMaterial Design 3 card default
Pill buttonborder-radius: 9999pxWorks at any width
Circle (square element)border-radius: 50%Element must be square
Top-only roundingborder-radius: 12px 12px 0 0Card attached to content below
Squircle approximationborder-radius: 30%iOS app icon shape, close approximation
One corner onlyborder-radius: 0 0 0 16pxBottom-left only (TRouBLe order)

TheFreeAITools — Free CSS Border Radius Generator is a fully private, browser-based tool for creating rounded corners and generating CSS border-radius code without any uploads. All processing happens locally on your device in 2026 , your component designs and design system values are never transmitted to external servers. Supports pixel (px) and percentage (%) units, linked and unlinked corner control, elliptical slash notation, and one-click code export — completely free with no account or design software required.

Video demo

☕ Support Us