Skip to tool
ecech.
🎨 Design & Color

Border Radius Has Eight Values, Not Four, and the Other Four Make Blobs

The slash syntax gives each corner a separate horizontal and vertical radius, which is how organic shapes are made in CSS without touching SVG.

Horizontal radii

CSS



  
Advertisement

How the calculation works

One corner, two radii 50 50 equal — a circle 90 50 different — an ellipse border-radius: 90px / 50px — horizontal before the slash, vertical after it

How to Use This Tool

Drag the numbers and copy the result. Turn on the slash syntax to give each corner a separate vertical radius, which is where the interesting shapes come from.

Four values, or eight

The familiar form sets one radius per corner, in clockwise order from the top left:

border-radius: 20px 10px 30px 5px;

The extended form adds a slash and four more values. Everything before the slash is a horizontal radius and everything after is vertical:

border-radius: 50% 20% 30% 40% / 60% 30% 70% 20%;

When a corner's two radii differ, it becomes a quarter-ellipse instead of a quarter-circle. That is the entire mechanism behind CSS blob shapes, and it needs no SVG, no clip path and no images.

Percentages behave differently from pixels

A percentage radius is relative to the box's own dimensions — horizontal radii to its width, vertical to its height. So a percentage-based shape keeps its proportions when the box resizes, while a pixel-based one does not.

This is also why border-radius: 50% turns a square into a circle and a rectangle into an ellipse. The radius is half the width in one direction and half the height in the other, which is exactly an ellipse inscribed in the box.

What happens when the radii do not fit radius 30, fits radius 200, same shape If two radii on one edge exceed the edge length, every radius is scaled down by the same factor. Increasing the number past that point does nothing.
Proportional scaling, not clipping — which is why the shape stays smooth.

The scaling rule

If the radii along any edge add up to more than that edge's length, the browser reduces every radius by the same factor until they fit. It does not clip and it does not reduce only the offending corner.

The practical consequence: setting a huge radius to "make it as round as possible" works, and setting it larger again changes nothing. A 9999px radius and a 50px radius on a 100px-tall box produce the identical result, which is why the pill-shaped button trick of border-radius: 9999px is safe at any size.

Two things worth knowing

  • The border follows the radius. A rounded box with a border keeps a uniform border width around the curve, and the inner radius shrinks by the border width automatically. Nesting a rounded element inside another looks wrong unless the inner radius is the outer radius minus the padding.
  • A squircle is not this. The rounded-square shape used by iOS icons is a superellipse and border-radius cannot make it — the curvature is continuous rather than a circular arc meeting a straight line. The preset here approximates it and does not match it.
Advertisement

Frequently Asked Questions

What does the slash do in border-radius?
It separates horizontal radii from vertical ones. The four values before the slash are horizontal radii for each corner and the four after are vertical. When a corner's two radii differ it becomes a quarter-ellipse instead of a quarter-circle, which is how CSS blob shapes are made.
How do I make a circle in CSS?
border-radius: 50% on a square element. On a rectangle the same value produces an ellipse, because the percentage is relative to width horizontally and height vertically — which is exactly an ellipse inscribed in the box.
Why doesn't increasing my border-radius do anything?
Because the radii already exceed the box. If two radii on the same edge add up to more than that edge's length, the browser scales every radius down proportionally until they fit. Past that point a larger number changes nothing, which is why border-radius: 9999px is a safe way to make a pill shape at any size.
What is the difference between percentage and pixel radii?
A percentage is relative to the box's own dimensions, so the shape keeps its proportions when the box resizes. Pixels are fixed, so a resized box changes shape. Percentages are usually right for decorative shapes and pixels for consistent UI corners.
How do I round the inner element of a rounded container?
The inner radius should be the outer radius minus the padding. Using the same radius on both makes the inner corner look too round against the outer curve, which is the most common reason nested rounded boxes look subtly wrong.
Can border-radius make an iOS-style squircle?
Not exactly. A squircle is a superellipse with continuously changing curvature, while border-radius produces a circular arc meeting a straight line — the join is mathematically abrupt even though it looks smooth. The preset here approximates the look and does not reproduce the shape.

Related tools in Design & Color

Browse all Design & Color tools
The Mac mini the ecech. site is built on, beside a handwritten note reading ecech.com.

Made by one person

ecech. is not a content farm. Every tool here is written and checked by hand, one at a time, by someone who wanted the tool to exist and could not find a version that showed its working.

No accounts and no sign-in, and nothing you type reaches a server — every calculation on this page runs inside your browser. The ads are served by Google and do set their own cookies, which is set out in full on the privacy page. More about the site.