CSS Border Radius Generator
Round each corner, or drag eight radii into organic shapes — then copy CSS or Tailwind.
Preview
Switch to Elliptical under Corners to drag the radii on the edges of the box.
Corners
Horizontal radii run along the top and bottom edges, vertical radii along the left and right edges. Drag the round handles on the preview, or focus one and use the arrow keys (Shift = 10 steps).
Presets
Code
Paste a border-radius
About the CSS Border Radius Generator
Design the border-radius of any element. In Corners mode you set each corner — top left, top right, bottom right and bottom left — together or one by one, in px, % or rem. In Elliptical mode every corner gets its own horizontal and vertical radius, the full 8-value syntax h h h h / v v v v, and you shape the box by dragging round handles along its edges: with Organic shape on, the two radii of each edge always add up to the whole edge, which gives the smooth blob shapes often called “fancy border-radius”.
The preview shows the shape on a box of the size you choose, or on an image from your device (it never leaves your browser). When radii are too large for the box, the page tells you exactly how far browsers shrink them. Copy the CSS shorthand, the four longhand properties, or Tailwind CSS classes for v4 or v3.
How to use it
- Pick a preset, or start with the default 24px corners. Under Corners, untick Same radius for all corners to set each corner on its own.
- Choose the unit: px for fixed corners, % for corners that grow with the element, rem to follow the root font size.
- For organic shapes choose Elliptical (8 values), tick Organic shape, then drag the handles on the preview — or type the eight values. Random shape makes a new blob.
- Set the preview box size, or choose Your image to see the corners on your own picture.
- Under Code, choose CSS, Longhands, Tailwind v4 or Tailwind v3 and select Copy code.
Examples
All corners 16px
border-radius: 16px; Tailwind v4: rounded-2xl
In Tailwind v4, 16px (1rem) is rounded-2xl; v3 uses the same name for it.
Top left and top right 12px, bottom corners 0
border-radius: 12px 12px 0 0; Tailwind v4: rounded-t-xl rounded-b-none
Elliptical · Organic · preset Blob 1
border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; Tailwind: rounded-[42%_58%_70%_30%/45%_45%_55%_55%]
Each edge’s pair adds up to 100%: 42 + 58 on top, 70 + 30 at the bottom, 45 + 55 on the left and right.
Common uses
- Cards, buttons, inputs and modals with consistent corner radii from a design system.
- Pills, tabs, chat bubbles, leaves and drops for UI accents.
- Organic blob frames for avatars, hero images and decorative backgrounds.
- Translating a radius from a design file into Tailwind classes.
How border-radius and the slash work
Each corner of a box is a quarter of an ellipse with a horizontal and a vertical radius (CSS Backgrounds and Borders Level 3 §5). The values before the slash are the horizontal radii, the values after it the vertical radii, both in the order top-left, top-right, bottom-right, bottom-left; one to four values per list follow the same shortening rules as margin (10px 20px means top-left and bottom-right 10px, the other two 20px). Without a slash the corners are circular.
Percentages are taken from the box: horizontal radii from its width, vertical radii from its height. That is why border-radius: 50% makes a circle on a square but an ellipse on a rectangle, and why % corners on a wide card look stretched.
When radii are larger than the box
Corner curves may not overlap. When the two radii along any side add up to more than that side, browsers multiply every radius by f = min(Lᵢ ÷ Sᵢ), where Lᵢ is the length of a side and Sᵢ the sum of the two radii on it (§5.5 Overlapping curves). Example: 80px corners on a 200 × 100 box give 160px on the 100px sides, so f = 100 ÷ 160 = 0.625 and every corner is drawn at 50px. The same rule makes the common 9999px turn any box into a pill: the radius shrinks to half the height. The preview shows f and the radii actually drawn whenever this happens.
Organic “blob” shapes
An elliptical radius can span the whole edge. If the two radii on the top edge add up to 100% (say 42% + 58%), and the same is true for the other three edges, the curves meet without a straight piece in between and the box becomes a smooth, rounded blob whose shape moves as you drag the meeting points. Organic mode keeps those sums at 100% while you drag; untick it to set all eight radii freely — straight stretches appear where a pair adds up to less, and the overlap rule above shrinks the shape where it adds up to more.
Limitations
- border-radius always draws elliptical arcs. Squircle, bevelled, notched or scooped corners need the newer
corner-shapeproperty (CSS Borders Level 4), which only Chrome and Edge 139+ support so far (MDN browser data), or SVG,clip-pathormask; this tool does not write it. - rem values and the Tailwind mapping assume the browser default root font size of 16px.
- Paste a value, a declaration or a whole CSS rule: the
border-radiusshorthand and its four longhands (such asborder-top-left-radius) are read in order, other properties are ignored. All corners must use one unit;calc()andvar()are not read. - The preview shrinks large boxes to fit small screens; px and rem corners shrink with it, so the proportions stay true.
Privacy
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
What does the slash in border-radius mean?
It separates the horizontal radii (before) from the vertical radii (after). border-radius: 40px / 20px gives every corner a curve 40px wide and 20px tall.
How do I make a circle or a pill?
For a circle, use 50% on a square element. For a pill on any rectangle, use a very large px value such as 9999px — browsers shrink it until the ends are perfect semicircles. Tailwind’s rounded-full does the same (9999px in v3, calc(infinity * 1px) in v4).
Why does my 100px radius look smaller than 100px?
Because the radii on one side add up to more than the side is long, so the browser scales all of them down by the same factor. The preview shows the factor and the radii actually drawn.
Which Tailwind class matches my radius?
In Tailwind v4: 2px rounded-xs, 4px rounded-sm, 6px rounded-md, 8px rounded-lg, 12px rounded-xl, 16px rounded-2xl, 24px rounded-3xl, 32px rounded-4xl. In v3 the small sizes are named differently: 2px is rounded-sm and 4px is plain rounded. Other values are written as arbitrary values such as rounded-[10px], and 8-value shapes as one arbitrary value.
Why are the children of my rounded box not clipped?
border-radius rounds the element’s own background and border; content that overflows it, such as a child image, is clipped only with overflow: hidden (or overflow: clip) on the rounded element.
Is my image uploaded?
No. The image is shown straight from your device and the page works offline once loaded.