A border radius generator for beginners lets you tune four CSS corners, preview their shape, and copy a compact, valid border-radius declaration.
The quickest way to learn is to master one circular radius, the clockwise corner order, and the difference between fixed and relative units. The CSS Border Radius Generator then handles the repetitive shorthand formatting while leaving you in control of each corner.
Its preview is for exploring values, not certifying the final interface. A declaration that looks balanced in the preview still needs to be checked with the component's real dimensions, padding, border, and responsive behavior.

Start with one radius per corner
CSS border-radius rounds the corners of an element's border box. In this focused generator, every corner receives one circular radius: zero leaves that corner square, while a positive value creates a curve. Backgrounds and borders follow the rounded shape. The tool intentionally handles circular radii only; CSS's more advanced elliptical syntax is covered later.
Read the four controls in CSS order: top-left, top-right, bottom-right, bottom-left. This clockwise sequence is not the same as reading two rows from left to right. The generator labels each corner, so beginners can select a labeled field instead of guessing which position CSS expects.
The CSS Backgrounds and Borders Level 3 specification defines this corner mapping. Learn the one-value case first—equal corners become one radius—then move to different values only when the design needs them.
Build your first rounded box
- Enter a radius for each corner in clockwise order. Start at top-left, then move through top-right, bottom-right, and bottom-left. If you want a uniform card, enter the same radius in all four fields.
- Choose pixels or percentages. Select pixels when the curve should remain a fixed size as the box changes. Select percentages when the curve should relate to the box's border-box dimensions.
- Inspect the preview at the displayed box dimensions. Check each curve, the overall silhouette, and any content close to an edge. The preview renders the generated shorthand itself, which helps reveal a corner-order or compression mistake before copying.
- Copy the compressed declaration and test it on the real component. Paste it into the relevant CSS rule, then inspect the element at its actual width, height, border, padding, focus outline, and responsive breakpoints.
For four equal 12px corners, for example, the output can be written as border-radius: 12px;. When the corners differ, the generator keeps as many values as CSS needs to preserve the selected corner assignments.
Choose between fixed and relative radii
The unit changes the behavior, not merely the way the number is displayed. Pixels describe a fixed curve. Percentages are resolved from the border box's dimensions, so they can create different-looking results as the component changes.
| Choice | How it behaves | Practical starting point |
|---|---|---|
| Pixels | Remains fixed as the element resizes. | Use for a consistent radius on cards, buttons, and controls. |
| Percentages | Relates to the border-box dimensions. | Use for pills, ovals, leaves, and strongly asymmetric shapes. |
A 50% radius on a square creates circular corners, while the same percentage on a wide rectangle creates an ellipse-like end. That makes percentages useful when you want the shape to follow the box rather than remain a constant distance from each corner.
Keep the distinction visible while you work. The Border Radius CSS: Pixels vs Percentages and Corner Order guide provides a compact reference for the same choice, and the preview should be checked again after changing units.
Percentages above 100% are accepted by CSS, but very large values can look similar after the browser resolves overlapping curves. An extremely large specified radius may therefore render smaller than its number suggests.
Decode the shorthand before you copy it
Compression is the point of the final declaration, not a sign that corner values were lost. CSS allows one to four values, and each count expands to a defined set of corners.
| Number of values | How CSS assigns the corners |
|---|---|
| One | Applies to all four corners. |
| Two | The first applies to top-left and bottom-right; the second applies to top-right and bottom-left. |
| Three | The first applies to top-left, the second is shared by top-right and bottom-left, and the third applies to bottom-right. |
| Four | Applies in order to top-left, top-right, bottom-right, and bottom-left. |
The two-value rule often surprises beginners: the first value belongs to the top-left and bottom-right, while the second belongs to the top-right and bottom-left. With three values, the middle value is shared by top-right and bottom-left. The generator's labels and shorthand-based preview remove guesswork while preserving exactly the corner values you selected.
Test the declaration in the real component
The preview cannot reveal every production issue. Before using the declaration, check these parts of the actual element:
- Real box size and responsive changes: Confirm that the curve remains intentional at narrow and wide widths.
- Border and padding: Make sure the background, border, and content do not crowd the curve.
- Overflow behavior: Check whether clipping follows an inner rounded edge and whether content is cut off.
- Focus and interaction: Verify keyboard focus, overflow, contrast, and an appropriate target size.
- Meaning: Do not rely on rounded shape or color alone to communicate state or meaning.
Very large radii can reduce the clickable corner area of a button or control. Radius affects presentation; it does not replace interaction and accessibility checks.
Know the generator's boundaries
The generator accepts nonnegative numeric radii with either px or percentage units. Zero is valid and creates a square corner. Negative radii and non-finite numbers cannot produce a valid CSS declaration. Percentage values can exceed 100, but browser normalization can make very large values look alike.
The focused interface does not create elliptical corners with separate horizontal and vertical radii divided by a slash. If you need that advanced syntax, use the MDN border-radius reference as a separate specification task rather than expecting the copied circular-radius declaration to cover it.
All processing happens locally in the browser. Design values are not uploaded or stored, no account is needed, and no new dependency is loaded.
Begin with a practical corner style
For a uniform card, start with a radius between 12px and 24px, then adjust for the card's size and content. For a pill, use a large pixel radius or 50%, provided the element has enough horizontal padding. For an organic panel, vary all four corner values with percentages and inspect the shape at the sizes it will use.
Those are starting points, not universal rules. The finished declaration should come from the generator, then pass the real-component checks that match your page.
Related reading: Neumorphism Generator Example: Build a Raised CSS Card.