CSS Border Radius Generator screenshot

CSS Border Radius Generator

Generate a CSS border-radius from four corner values in pixels or percent. Copy the ready rule; runs entirely in your browser.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Instant
No signup

What the CSS border radius generator builds

The four values are printed in CSS order — top-left, top-right, bottom-right, bottom-left — either in pixels for a fixed corner or in percent for a shape that scales with the element. Percentages are measured on each axis separately, so 50% on a rectangle produces an ellipse rather than a circle; that is the behaviour people most often mistake for a bug. All four corners are always written out, even when they are identical, so the declaration says exactly what it does instead of relying on the shorthand to fill in the rest. A radius larger than half of the shorter side is reduced by the browser, which is why the range stops at 200: past that the number grows while the rendering does not.

How to use it

Set the four corners independently, choose px for fixed corners or % for a shape that scales with the element, then press Run. All four values are written out even when they match, so the rule reads exactly like the controls.

Worked example

Input:

top-left: 16px, top-right: 16px, bottom-right: 16px, bottom-left: 16px, unit: px

Output:

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

Why it runs in your browser

The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.

The four values are printed in CSS order — top-left, top-right, bottom-right, bottom-left — either in pixels for a fixed corner or in percent for a shape that scales with the element. Percentages are measured on each axis separately, so 50% on a rectangle produces an ellipse rather than a circle; that is the behaviour people most often mistake for a bug. All four corners are always written out, even when they are identical, so the declaration says exactly what it does instead of relying on the shorthand to fill in the rest. A radius larger than half of the shorter side is reduced by the browser, which is why the range stops at 200: past that the number grows while the rendering does not.

Generate a CSS border-radius from four corner values in pixels or percent. Copy the ready rule; runs entirely in your browser.

How to use it

Set the four corners independently, choose px for fixed corners or % for a shape that scales with the element, then press Run. All four values are written out even when they match, so the rule reads exactly like the controls.

Why it runs in your browser

The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.

What to Expect

What this tool keeps

  • The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.

Sample input

top-left: 16px, top-right: 16px, bottom-right: 16px, bottom-left: 16px, unit: px

Sample output

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

Frequently asked questions

How do I use the css border radius generator?

Set the four corners independently, choose px for fixed corners or % for a shape that scales with the element, then press Run. All four values are written out even when they match, so the rule reads exactly like the controls.

Is my input uploaded?

Nothing is uploaded. The result is produced on this page.

Is there a size limit?

No: nothing is pasted, so there is no input size to exceed.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.