Skip to content
OddsockLocal
Local
Horizontal radii (%)55 45 63 37
Vertical radii (%)35 43 57 65
Horizontal radii (%)55 45 63 37
Vertical radii (%)35 43 57 65
ReadyRuns in this browser. Nothing is uploaded.

How to use

  1. Type four percentages for the horizontal corners.
  2. Type four percentages for the vertical corners.
  3. Copy the declaration onto a square with a background color.
  4. Nudge one number if a corner still looks like a button.

What is CSS blob?

A blob that looks hand-drawn is usually eight numbers on a border-radius, not a vector someone nudged for an hour. The shorthand takes four horizontal radii and four vertical radii. The page opens at 55% 45% 63% 37% across and 35% 43% 57% 65% down, which is already lopsided enough to read as a pebble rather than a pill. The CSS that comes back is one declaration: border-radius: 55% 45% 63% 37% / 35% 43% 57% 65%;

Read more

The slash is the whole trick. Numbers before it push the corners along the width. Numbers after it push them along the height. If you omit the second set, every corner uses a matching vertical radius and the shape gets closer to a rounded square. Each value has to sit between 0% and 100%, and each axis needs exactly four numbers. Three numbers is a CSS shorthand the page will not guess at.

Put the rule on a square element with a background. On a very wide rectangle the same percentages stretch into a smear.

Use cases

  • A landing section needs an abstract shape behind a heading, with no image file.
  • A designer tries uneven corners until a mask feels less like a button.
  • A slide background uses one blob as a color block.
  • A tutorial shows what the slash in border-radius actually does.
  • A set of avatars gets slightly different blobs so they are not identical pills.

The opening pebble

Horizontal radii 55 45 63 37, vertical radii 35 43 57 65.

border-radius: 55% 45% 63% 37% / 35% 43% 57% 65%;

Why use Oddsock

Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.

Related tools

Using this tool

It separates horizontal radii from vertical radii. Without it, a corner's height follows its width and the blob gets more regular.