⬜ CSS Border Radius Generator

Control all 8 sub-radius values visually. Build blobs, pills, squircles and asymmetric shapes.

Quick Presets
Mode
Link all corners
Advanced (8 sub-values)
Use % values
Corner Radii
All Corners 20px
Shape Style
Width 200px
Height 200px
Fill
Live Preview
Border Radius
Generated CSS
All CSS Values

About CSS border-radius

The Full Syntax

border-radius shorthand accepts 1–4 values before the optional / and 1–4 values after it. Values before the slash define horizontal radii; values after define vertical radii. This allows elliptical corners — perfect for blobs and organic shapes.

Percentage vs Pixel

Percentage values are relative to the element's dimensions: horizontal percentages reference width, vertical percentages reference height. border-radius: 50% creates a perfect circle on a square, while a rectangle becomes an ellipse. Pixel values stay fixed regardless of size.

Common Patterns

  • Pill: border-radius: 999px
  • Circle: border-radius: 50%
  • Squircle: ~ 30% all corners
  • Blob: asymmetric 8-value syntax
  • Card: 8px 16px
The Slash Syntax — the Part Most Tutorials Skip
Every border-radius cheat sheet shows you circles and pills. Almost none of them explain the forward slash, which is what makes actual blob shapes possible.

The full shorthand is border-radius: [h-radii] / [v-radii]. Values before the slash define horizontal radii; values after define vertical. Drop the slash and both axes get the same value — which is why most corners look circular. But corners don’t have to be circular. Add the slash and each corner becomes an ellipse, which is the only way to get proper organic blob shapes without resorting to SVG.

ShapeValueHonest notes
Circle50%Only a true circle on a square element. On a 200×100 box, 50% gives an ellipse because the percentage computes against each axis independently. If the shape needs to stay circular regardless of dimensions, use an explicit 9999px instead.
Pill / capsule9999pxBetter than 50% for buttons and tags. Large pixel values cap at the natural maximum per side, so you get a semicircle on each end at any aspect ratio without any ellipse weirdness.
Standard card8pxThe de facto web default. Goes up to 16px for cards that want to feel more “app-like.” Beyond 24px starts looking cartoonish in most UI contexts.
Squircle30% 70% 70% 30% / 30% 30% 70% 70%The iOS app icon shape. Not technically a squircle (that’s a superellipse and CSS can’t render one natively), but close enough that most people can’t tell the difference at glance.
Organic blob63% 37% 54% 46% / 55% 48% 52% 45%Arbitrary asymmetric values. Drag the handles in the preview to discover shapes — sliders alone take too long. Export and then fine-tune in code.
No rounding0Explicit is better than absent. Some CSS resets or parent components set a default radius; writing 0 overrides them clearly.
Four Things That Catch People Out
None of these are in the MDN summary. All of them have caused at least one "why isn't this working" 20-minute debug session.
border-radius doesn't clip children — overflow: hidden does

This trips up almost everyone at least once. border-radius rounds the painted border and background of the element. It doesn’t clip child elements that overflow it — those paint right over the rounded corners. Add overflow: hidden to the parent. If the child is an <img> and you also need object-fit, you may need overflow: hidden on a wrapper, not the img itself.

Table cells silently ignore it

Apply border-radius to a <td> or <th> and nothing happens. The reason is border-collapse: collapse — collapsed table borders and border-radius are incompatible at the spec level. Switch to border-collapse: separate and set border-spacing: 0 to fake the look of a collapsed table while getting radius to work.

Percentage values compute against each axis separately

On a 400×200 element, border-radius: 50% produces a 200px horizontal radius and a 100px vertical radius — an ellipse, not a circle. This is correct per spec, but it surprises people who think percentage means "half of the shorter dimension." If you need a circle at a specific size, use explicit pixel or rem values, or ensure the element is a square.

Animating between blob shapes can stutter in older Safari

Animating border-radius between complex asymmetric values worked unreliably in Safari before version 15.4. The browser would sometimes drop to the main thread instead of compositing the animation. If you’re targeting older iOS/macOS, test on device early. Adding will-change: transform to the element helps push it to a compositor layer, though it’s not a guarantee.

Other CSS Tools
Questions
On a square element they’re visually identical. The difference appears on non-square elements: 50% computes a separate radius per axis (50% of width horizontal, 50% of height vertical), so a wide rectangle becomes an oval. 9999px caps at whatever fits, which on a rectangle gives you a stadium / capsule shape with semicircular ends. For avatars and icon frames that are always square, use 50%. For buttons and tags that can be any width, use 9999px.
Yes. Use the individual longhand properties: border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius. Or use the 4-value shorthand with zeros in the other positions: border-radius: 12px 0 0 0 rounds only the top-left corner. The shorthand goes clockwise from top-left, same as margin and padding.
It depends on the browser and the element type. In most modern browsers, the visible rounded area does affect pointer event hit testing — clicking in the visually cut-off corner area won’t trigger click events on the rounded element. However, this is not universally guaranteed for all element types, particularly SVG. If you’re building interactive elements with heavily rounded corners, test click behavior in your target browsers rather than assuming hit regions match the visual.
You’re seeing two separate radii: the outer curve (border edge) and the inner curve (content edge). CSS automatically adjusts the inner radius to account for the border width — the inner radius equals the specified radius minus the border width. For thin borders this is barely noticeable, but with a thick border (8px+) the inner corners can look noticeably different. This is correct behaviour, not a bug. If you need both curves to look visually matched, you’ll need to manually compensate.