CSS Border Radius Generator · Tutorial

How to make an organic blob shape with CSS

6 min readintermediateUpdated

Designers often place a soft, organic shape behind photos or illustrations. This tutorial makes one with nothing but border-radius, explains the eight values behind it, and shows how to animate it gently.

What you need

Steps

  1. Load the blob

    The sample uses percent units and Elliptical corners. Each corner has a different radius across and down, so the square becomes a smooth, lopsided shape.

  2. Understand the eight values

    The CSS is two lists separated by a slash. The first list holds the horizontal radii of the four corners, starting top left and going clockwise; the second holds the vertical radii. Percent values are relative to the box’s width and height.

    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  3. Shape it to taste

    Change one corner at a time. Larger values make a corner rounder and pull it inward; the opposite corners balance the shape. Keep values between about 25% and 75% for a smooth result.

  4. Use it behind an image

    Copy the CSS and apply it to an element with a background colour or gradient. Set the same value on an <img> with object-fit: cover to crop a photo into the blob.

  5. Animate it gently

    Define two blob shapes and switch between them with a slow animation. Respect reduced motion so the shape stays still for people who turn animations off.

    @media (prefers-reduced-motion: no-preference) {
      .blob { animation: morph 8s ease-in-out infinite alternate; }
    }
    @keyframes morph {
      to { border-radius: 40% 60% 70% 30% / 50% 60% 40% 50%; }
    }

Try it yourself

Opens the CSS Border Radius Generator with this tutorial's sample loaded.

Try it now

Common mistakes

Using px for blobs
Pixel radii don’t scale with the element, so the shape changes at different sizes. Use percent.
Values that add up past 100%
If two neighbouring radii add up to more than 100%, the browser scales all of them down, which can make the shape look different from what you expect.
Forgetting overflow
Child elements can stick out of the rounded corners. Add overflow: hidden to clip them.

Next steps

Go back to the CSS Border Radius Generator, or keep going with one of these:

FAQ

Can I make a random blob?

Change each corner to a different value between 25% and 75%; any combination gives a smooth shape.

Does it work in all browsers?

Yes. Elliptical border-radius has been supported everywhere for over a decade.