Border Radius Generator

Generate CSS border-radius values.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Enter a radius in pixels and get the value to use in border-radius for all four corners. It outputs the value only, such as 8px, not the full declaration.

How to use

1
Step 1
Enter the radius in pixels.
2
Step 2
Press Generate.
3
Step 3
Paste the value after border-radius: in your CSS.

How it works

A single value in border-radius applies to every corner. The tool returns that value with a px unit. For different corners write up to four values in the order top-left, top-right, bottom-right, bottom-left, or use 50% on a square element for a circle.

Worked example

A card radius

Input
8
Output
8px
Walkthrough
border-radius: 8px; rounds all four corners equally.

Limitations

  • One value for all corners; per-corner and elliptical radii are not generated.
  • Pixels only.

Questions

How do I round corners with CSS?
Set border-radius to a length such as 8px on the element.
How do I make a circle?
Use border-radius: 50% on a square element.
Can I set different radii per corner?
Write up to four values by hand: top-left, top-right, bottom-right, bottom-left.
Does it give the full CSS declaration?
No, only the value.

Features

  • Single radius value
  • Copy-ready
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Learn JSON - Full Crash Course

    freeCodeCamp.org

    JSON is the payload format behind many developer tools here.

    Watch on YouTube
  • TypeScript in 100 Seconds

    Fireship

    Typed JS snippets often get formatted or hashed nearby.

    Watch on YouTube