A CSS border radius generator rounds the corners of an element. Drag one slider to round all four corners together or set the top-left, top-right, bottom-right and bottom-left values separately in pixels or percent. The preview updates live, and the tool writes the shortest valid border-radius shorthand.
How to use the Border Radius Generator
- Round all cornersDrag the All corners slider to set the same radius everywhere.
- Fine-tune each cornerMove the individual sliders to give corners different radii, and choose pixels or percent.
- Copy the CSSPress Copy and paste the border-radius line into your CSS rule.
How border-radius works
The border-radius property replaces each sharp corner with a quarter of a circle (or ellipse) of the radius you give. The shorthand accepts one to four values, always read clockwise from the top-left corner. This CSS border radius generator picks the shortest form for you:
- One value (
24px): all four corners. - Two values (
10px 20px): top-left and bottom-right, then top-right and bottom-left. - Three values (
10px 20px 30px): top-left, then top-right and bottom-left, then bottom-right. - Four values (
10px 20px 30px 40px): top-left, top-right, bottom-right, bottom-left.
If two neighbouring radii add up to more than the side they share, the browser scales all radii down in proportion so the curves never overlap. That is why a very large value on a small element does not break anything.
The property works on almost anything with a box: divs, buttons, images, inputs and table cells. It has been supported without prefixes in every major browser for many years.
Pixels or percent?
Pixels give the same curve on every element regardless of size. Use them for cards, inputs and buttons so that the whole interface shares a consistent corner, for example 8px or 12px.
Percent is measured against the element itself: the horizontal radius against its width and the vertical radius against its height. That makes two shapes easy:
- Circle or ellipse:
border-radius: 50%. On a square element this is a perfect circle, the standard way to make round avatars. On a rectangle it is an ellipse. - Pill: for a button with fully rounded ends, do not use 50%. Use a large pixel value such as
9999px, which the browser trims to half the height.
Rounded corners clip the background and border, but child content can still poke out of the corners: add overflow: hidden when an image sits inside a rounded card. Combine the shape with depth from the box shadow generator, or build arrows and pointers with the CSS triangle generator.
Frequently asked questions
How do I round the corners of a div in CSS?
Add border-radius with a length, for example border-radius: 12px. The CSS border radius generator lets you set each corner and copies the code.
How do I make a circle with CSS?
Give the element equal width and height and set border-radius: 50%. If the element is not square you get an ellipse instead.
In what order are the four values applied?
Clockwise from the top left: top-left, top-right, bottom-right, bottom-left.
How do I make a pill-shaped button?
Use a very large pixel radius such as 9999px. The browser limits it to half the height of the button, which gives fully rounded ends.
Why is the corner of my image not rounded?
A child element can overflow the rounded corners of its parent. Add overflow: hidden to the parent, or apply the same border-radius to the image.
Last updated 24 November 2026 by the TheTechFolk team.