Border Radius Generator
Shape each corner to build CSS border-radius, including blob shapes with separate X/Y radii, presets and a Tailwind class.
Shape each corner to build CSS border-radius, including blob shapes with separate X/Y radii, presets and a Tailwind class.
Lets you adjust corner roundness (border-radius) for each corner and generates the CSS.
Adjust the values for the four corners.
Check the preview.
Copy the CSS.
px gives the same radius regardless of box size, while % is proportional to the box size. 50% on a square makes a circle, and for a pill shape many people use a large px value (for example 999px). When you switch units, values are converted based on the preview size so the shape is kept as much as possible.
Turn on separate horizontal/vertical and switch to individual corner control, and you can set the horizontal and vertical radius for each corner. The presets include leaf, drop and blob, and the Random blob button generates a smooth blob shape at random.
The Tailwind value appears under the CSS declaration. 8px comes out as a default class like rounded-lg, and other values as rounded-[...]. If a px value is more than half the box size, the browser scales it down proportionally when drawing.
With one value all four corners are the same, and with four values they apply in the order top-left, top-right, bottom-right, bottom-left (clockwise). border-radius: 12px 12px 0 0 gives the top of a card with only the upper corners rounded.
Giving a square 50% makes a circle, and giving a rectangle a very large value (for example 9999px) makes a pill shape with semicircular ends. If a value is larger than the side, the browser shrinks it automatically when drawing.
If you write the horizontal and vertical radii separately with a slash (/), the corners become elliptical. For example, making horizontal and vertical values differ, as in 60% 40% 30% 70% / 60% 30% 70% 40%, gives an organic, droplet-like shape. If you adjust each corner in this tool, it creates these values for you.
You can use the shape for background decoration or a profile photo frame. It is quicker to start from a preset and change the values little by little.
In Tailwind, you apply common values with classes such as rounded-md, rounded-lg and rounded-full. If a value made by this tool does not fit a default class, write it in arbitrary-value syntax such as rounded-[60%_40%_30%_70%/60%_30%_70%_40%].
Use 50% on a square for a circle, a very large px value on a wide box for a pill, and a large value on only the top two corners for a semicircle.
Circle
Pill (capsule)
Top semicircle (arch)
Ellipse
Speech bubble
Click Circle, Pill, Arch or Speech bubble in the presets and the values above are filled in right away.
When the radius is more than half the box size, the browser scales it down automatically, so you always get a perfect pill without knowing the size.
If the button height is 36px, 18px works too, but you have to change the value whenever the height changes. With 999px or 9999px, both ends stay perfect semicircles even when the height changes.
However, a value that large hides the intent, so in team code a named value like rounded-full is easier to read.
The basic rule is px or rem for UI of fixed size, and % when the shape of the figure matters.
This tool can switch between px and %. When you switch, the values are converted based on the current box size.
There is no fixed answer, but 4–8px for small elements, 12–16px for cards and 16–24px for modals are commonly used.
What matters is consistency rather than the number itself. Use the same radius for elements of the same size class, and make larger elements slightly rounder to look stable.
Below are the px equivalents often used in Tailwind v4. If you set a px value in this tool to one of these numbers, it converts directly to the Tailwind name.
2px
4px
6px
8px
12px
16px
24px
32px
Set the outer radius to the inner radius plus the gap between the two, and the corners will look parallel.
For example, if the image inside the card has an 8px radius and the card padding is 8px, a card radius of 16px looks natural. If the outer and inner values are the same, the gap looks wider at the corners.
This rule works the same way for bordered images, button groups and icon buttons inside input fields.
Applying it directly to the image, or giving the parent overflow: hidden as well, fixes most cases.
If you applied border-radius to an img tag and the corners stay the same, the image may be covered by another element, or the parent's overflow setting may be the cause. For elements that use a background image, the radius must be set on the element itself.
If you applied the radius to the parent wrapping the image, you must also give it overflow: hidden so the inner image is clipped too.
A round profile photo must be a square with equal width and height. Applying 50% to a rectangle makes an ellipse.
If you give one corner different horizontal and vertical values, you get an elliptical curve instead of a circle, which lets you make more organic shapes.
In CSS you separate the horizontal and vertical values with a slash, as in border-radius: 50% / 10%. Before the slash are the horizontal radii of the four corners, and after it the vertical radii.
Turn on the separate horizontal/vertical option in this tool and two sliders appear for each corner so you can set the values. Most asymmetric shapes like leaves and drops are made with this feature.
Give a number to only the corner you want among the four values and leave the others at 0.
The order is top-left, top-right, bottom-right, bottom-left. To round only the top of a tab, write 12px 12px 0 0; to keep only the tail side of a speech bubble square, write 24px 24px 24px 4px.
In this tool, moving a per-corner slider shows up in the preview right away, and the all-corners slider adjusts them all at once.
border-radius can change smoothly with transition and keyframes, so you can make rippling blobs or button morph effects.
Once you set the border-radius values of the two states, the browser calculates the in-between values. The two values should have the same number of values and the same unit (both %) to animate naturally.
Put two different values made with the random blob into from and to and repeat slowly over 8–12 seconds to get a softly undulating background shape.
A border is drawn rounded following border-radius, and in modern browsers the outline follows the rounded corners too.
In older environments, however, the outline may still appear square. For buttons where the focus indicator matters, a ring made with box-shadow instead of outline is also used.
Shadows follow border-radius as well, so a box-shadow on a rounded box spreads with a rounded shape too.
Percentage values calculate the horizontal radius from the box width and the vertical radius from the height, so on a rectangle the corners become elliptical.
With 20% on a box 300px wide and 100px tall, the horizontal radius is 60px and the vertical radius is 20px. The corner becomes a flat ellipse rather than a round arc.
To keep corners as circular arcs, use px rather than % on rectangles. Switch the unit at the top of the tool to px and the curvature stays constant regardless of size.
On a square, % and px give the same shape. It's safest to use % only when making circles or drops.
Give the card border-radius and overflow: hidden, and the inner image is clipped to the card shape too.
Alternatively, give the image only its top two corners directly, like 12px 12px 0 0. This is accurate when the image height is only part of the card.
If you also use a shadow on the card, check that overflow: hidden doesn't clip the shadow. The shadow is drawn outside the card so it usually isn't clipped, but it is if a parent element has overflow.
Set the touching corners to 0 and round only the outer corners, and they look joined as one piece.
For example, give the input only its top-left and bottom-left 8px and the button only its top-right and bottom-right 8px. The input value becomes 8px 0 0 8px and the button value 0 8px 8px 0.
Make the values with the per-corner sliders in this tool and copy the code. For a pill-shaped search bar, give a large value to both ends.
With the clamp() function, you can adjust the radius automatically with the screen width between a minimum and a maximum.
For example, border-radius: clamp(8px, 2vw, 24px) gives 8px on small screens and grows up to 24px on large screens. This reduces the problem of a small radius looking awkward when cards get wider on large screens.
You can also change the value at each breakpoint with media queries. Make the two values separately in this tool and copy them.
border-radius only rounds the corners, while clip-path cuts the element into any shape you want.
Main use
Border
Shadow
Animation
If you only need rounded corners, border-radius is the simplest and safest.
Apply 50% to an image set to a square and you get a perfectly round avatar.
For images with different width and height, also use object-fit: cover to fill the square while keeping the ratio, or it will look squashed. Give the same value for width and height.
For overlapping profile photo lists, a rounded white border makes them easy to tell apart. The circle preset in this tool uses 50%.
If the radius is excessive for the size, it looks playful or light, so it's good to decide first whether it fits the character of your service.
You can paste the copied value straight into border-radius, and 0 needs no unit.
When you change the unit from px to %, the values are converted to the box size. Check which unit is selected before copying the code.
If your project uses Tailwind, copy the rounded class shown alongside it and it applies right away without any configuration.