AI Tools Free

CSS Border Radius Generator

Set four pixel corner radii, preview the shape, and copy a CSS border-radius declaration in top-left, top-right, bottom-right, bottom-left order.

Free to useNo sign-upRuns in your browser
Enter your details

Update the inputs to see your result.

Your result
Enter your details

Result will appear here

How CSS Border Radius Generator works

Four pixel values are placed in CSS corner order and applied to the preview.

The four corner values are formatted in CSS shorthand order and appended with px units. The resulting border-radius value is applied to the preview and included in the copyable declaration.

Uses pixel radii. The visible corner curve can be reduced by CSS when the combined radii exceed box dimensions.

Conceptual shape with four separate corner radii leading to a CSS border-radius declaration.
The generated shorthand follows the four CSS corner positions.

CSS Border Radius Generator Quick Reference & Input Guide

Review the input parameters, allowed value ranges, and worked reference cases for the CSS Border Radius Generator below before running your calculation.

Parameter / ScenarioDefault / Sample ValueRule or Allowed RangeOutput / Usage Note
Input: Top left24Range: 0 to 200Required workspace parameter
Input: Top right8Range: 0 to 200Required workspace parameter
Input: Bottom right24Range: 0 to 200Required workspace parameter
Input: Bottom left8Range: 0 to 200Required workspace parameter

How to use CSS Border Radius Generator

The four inputs map to the four corners in CSS declaration order.

Set each pixel corner radius

Enter top-left, top-right, bottom-right, and bottom-left radii in pixels. Use different values to inspect individual corners or equal values for a consistent rounded shape. This form does not offer percentage or elliptical-radius syntax.

Top left
CSS Border Radius Generator native input panel with the actual Top left, Top right, Bottom right settings used for this example.
Configure Top left, Top right, Bottom right; select Generate CSS.

Generate and inspect the corner shape

Select Generate CSS and review the shape preview and four-value result. The page applies the same border-radius value to the preview that it includes in the declaration. Keep the CSS corner order with the values when reading the output.

40px 8px 24px 8px
CSS Border Radius Generator actual result panel showing 40px 8px 24px 8px.
Submitted result: 40px 8px 24px 8px. Corner order: TL · TR · BR · BL.

Copy the declaration and test the box

Use Copy result to take the border-radius declaration into a CSS rule. The output is one property rather than a complete stylesheet. Actual curves can be reduced when radii exceed box dimensions, so check the intended element size after applying it.

Output and export
CSS Border Radius Generator actual output and export region and result note after submitting the pictured settings.
Review the actual CSS Border Radius Generator output and visible Copy result controls. Read the result note.

Preview rounded rectangles and asymmetric CSS corners

Compare baseline and alternative runs for CSS Border Radius Generator before exporting the result.

Create a consistent rounded rectangle

Give all four corners the same pixel value to preview a consistently rounded rectangle. Check the declaration's four values before applying it. The preview shows one example box and does not determine the dimensions of the element in your own page.

Developer input and configuration represented by document cards.
Prepare the input. Concept illustration.

Inspect alternating corners

Give top left and bottom right one value, then top right and bottom left another. This produces a recognisable asymmetric pattern. Changing a single input shows which corner it controls and helps prevent reversing the order in a copied declaration.

A developer example flowing from input to reviewed output.
Inspect an example. Concept illustration.

Test a large radius against a box

Try a larger radius and inspect it in the actual element after copying. CSS can reduce visible corner curves when combined radii exceed box dimensions. A preview on one sized box therefore cannot predict every component's exact appearance.

Developer output handed to the next stage of a workflow.
Use the result in your workflow. Concept illustration.

CSS border-radius order and box dimensions

Review the calculated output alongside your entered parameters and unit conventions.

Every calculation follows the rule: CSS order: top-left, top-right, bottom-right, bottom-left. Because JavaScript uses IEEE 754 double-precision floating-point arithmetic, numeric outputs display up to 12 significant digits where applicable.

Always cross-check the displayed result against the scope note (Uses pixel radii. The visible corner curve can be reduced by CSS when the combined radii exceed box dimensions) before applying the value to production specifications, financial models, or lab records.

A developer result reviewed alongside its source.
Review the returned output. Concept illustration.

Check the applied rule and box dimensions

Check supported units and test the declaration on the intended element.

Operational scope: Uses pixel radii. The visible corner curve can be reduced by CSS when the combined radii exceed box dimensions. Inputs that violate minimum/maximum bounds or required format rules are rejected with a clear diagnostic prompt.

Need an adjacent calculation in Developer Tools? Use the related tools linked below to chain your workflow without leaving your browser.

Input format and assumptions reviewed for a developer task.
Check format and assumptions. Concept illustration.

Frequently Asked Questions About CSS Border Radius Generator

Answers about using CSS Border Radius Generator and understanding its results.

What is the order of the four numbers?

Top-left, top-right, bottom-right, and bottom-left.

Can I copy the CSS?

Yes. Use Copy result beneath the generated declaration.

Does this support percentages or elliptical radii?

No. The current form outputs four pixel values. It does not expose percentage units or slash-separated elliptical radii.

Why can a very large radius render smaller?

CSS can reduce combined radii when they exceed box dimensions. Test the declaration on the actual element size rather than relying only on this preview.

Use CSS Border Radius Generator

Choose another tool for your next calculation, conversion, or text task.

Generate CSS