UI design

CSS blob shapes with border-radius (and how to animate them)

Organic blob shapes need only one line of CSS. How the eight-value border-radius syntax works, which values look good, how to animate a morphing blob, and when to use SVG instead.

You can make a blob shape in pure CSS with the eight-value border-radius syntax: four horizontal radii, a slash, then four vertical radii, such as border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%. When the horizontal and vertical radius of a corner differ, that corner curves elliptically, and together the four corners form a smooth, organic shape. It is one line of CSS, it scales with the element, and you can animate it into a slowly morphing blob.

Key takeaways

  • Use percentages between about 20% and 80% for smooth blobs; values near 0% give flat sides.
  • Give the element a fixed aspect ratio, usually 1, so the blob keeps its shape.
  • Transition or animate between two border-radius values for a morphing effect, and respect reduced motion.
  • Use SVG instead when you need sharp points or more complex outlines.

How does the eight-value border-radius syntax work?

Most of the time we write one value, such as border-radius: 12px, which makes every corner a quarter circle. But each corner is really part of an ellipse with its own horizontal and vertical radius. The full syntax sets all eight:

.blob {
  /* horizontal radii: top-left, top-right, bottom-right, bottom-left */
  /* vertical radii:   top-left, top-right, bottom-right, bottom-left */
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  width: 320px;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #a98bff, #ff6fb1);
}

Percentages are measured against the element’s width for horizontal radii and its height for vertical ones. If two neighbouring radii add up to more than 100% of a side, the browser scales all the radii down proportionally until they fit, so you can’t break the shape with large numbers; you just get rounder results.

CornerHorizontal (before the slash)Vertical (after the slash)
Top left1st value5th value
Top right2nd value6th value
Bottom right3rd value7th value
Bottom left4th value8th value

What values make a good blob?

Values between 20% and 80% give smooth, rounded shapes. Pair a small value with a large one on the same corner, such as 30% horizontal and 70% vertical, to stretch the curve and break the symmetry. Values close to 0% create flat sides, which make the shape look more like a pebble or a rounded rectangle. The quickest way to find a shape you like is to randomise until something looks right, then fine-tune.

How do you animate a CSS blob?

Browsers can interpolate between any two border-radius values, so a pair of keyframes gives a slow, living shape:

.blob {
  animation: morph 12s ease-in-out infinite alternate;
}

@keyframes morph {
  from { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
  to   { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
}

Keep it slow, ten seconds or more per cycle, so it reads as ambient movement rather than a distraction. A gentle rotate in the same animation adds variety. Because border-radius changes trigger repaints, use animated blobs for one or two decorative elements, not dozens.

Where do blobs work well in a design?

  • Behind product shots or illustrations, to give a cut-out image a soft backdrop.
  • Avatar and team photo frames, for a friendlier feel than circles.
  • Hero section accents, blurred with filter: blur() into soft colour clouds.
  • Section dividers and badges where a rectangle feels too rigid.

Images in blobs: Apply the same border-radius directly to an <img> with object-fit: cover, or to a wrapper with overflow: hidden, and the photo is clipped to the blob. For arches, waves and other shapes, see shaping images with CSS.

How do you make soft, blurred blob backgrounds?

Many current landing pages use blurred blobs of colour behind the content, sometimes with frosted glass cards on top. Position two or three blobs absolutely inside a section, blur them heavily, and keep them behind the text:

.section { position: relative; isolation: isolate; overflow: hidden; }

.section::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 10% auto auto 5%;
  width: 40%;
  aspect-ratio: 1;
  border-radius: 40% 60% 55% 45% / 50% 40% 60% 50%;
  background: #a98bff;
  filter: blur(60px);
  opacity: .6;
}

Large blurs are relatively expensive to paint, so avoid animating them on long pages, and check text contrast against the brightest part of the blob. Pair them with the glassmorphism generator for the frosted card look.

CSS blob or SVG blob?

CSS border-radius blobSVG blob
CodeOne lineA path with many points
ScalingFollows the element automaticallyFollows the viewBox
AnimationSimple keyframes between two valuesNeeds matching point counts or a library
Shapes possibleSmooth, rounded, always convex-ishAnything, including sharp points and dents
Best forBackgrounds, frames, decorative accentsIllustrations, logos, complex outlines

A border-radius blob can never have an inward dent, because every corner curves outwards. If you need a shape with a concave edge, draw it as an SVG and use it as a mask; the image shape masks tool and our guide to SVG data URIs in CSS cover that.

Make a blob

Press randomise in the CSS blob generator until you find a starting shape, adjust each corner’s horizontal and vertical radius, pick a solid or gradient fill and copy the CSS. “Paste into” rewrites it for Elementor, Divi, Bricks, Breakdance or the block editor. For the fill, the CSS gradient generator and our guide to CSS gradients help.

Last checked: October 2026.

Sources: MDN: border-radius, W3C CSS Backgrounds and Borders: corner overlap.