FormatterHQ

CSS Border Radius Generator

Round each corner separately in px or %, or switch to blob mode to shape organic forms with the 8-value border-radius syntax, and copy the CSS.

Loading tool…
Ready.

How to use the CSS Border Radius Generator

  1. Pick a Mode: Per corner for ordinary rounded boxes or Organic blob (8 values) for free-form shapes. Presets (Pill, Leaf, Ticket, Blob, Egg) set everything at once.
  2. In Per corner mode, set Top left, Top right, Bottom right and Bottom left, choose px or % as the Unit, and change the preview Box width and Box height.
  3. In blob mode, drag the Top, Right, Bottom and Left edge sliders to move where the corner curves meet.
  4. Copy the rule with Copy or Download on the CSS tab, or grab Copy CSS + HTML / Download HTML demo.

A CSS border radius generator for corners and blobs

This CSS border radius generator covers two jobs. In Per corner mode it sets each corner of a box individually, in px or %, and writes the shortest valid border-radius shorthand. In Organic blob mode it uses the slash syntax, which gives each corner separate horizontal and vertical radii, to produce the smooth, irregular blob shapes used in hero sections and avatars.

Examples

Equal corners collapse to a single value, and matching diagonal corners to two. The Ticket preset (24/4/24/4px) produces:

.shape {
  border-radius: 24px 4px;
}

The default blob comes out as eight values:

.shape {
  border-radius: 30% 70% 30% 70% / 30% 60% 40% 70%;
}

The four values before the slash are the horizontal radii of the top-left, top-right, bottom-right and bottom-left corners; the four after it are the vertical radii in the same order.

How blob mode works

Each edge slider sets the point where the two corner curves on that edge meet. Top edge at 30% makes the top-left curve 30% wide and the top-right curve 70% wide, so the two always add up to 100% and the outline stays smooth with no flat sections. The left and right sliders do the same vertically. The Egg preset, for instance, gives 50% 50% 50% 50% / 60% 40% 60% 40%.

Tips and common mistakes

  • Pill vs ellipse. The Pill preset uses 999px, which the browser scales down to half the shorter side, giving perfectly round ends at any width. 50% on a rectangle gives an ellipse instead.
  • Percentages are relative. Horizontal radii use the element's width and vertical radii its height, so a % radius looks different on a wide banner than on a square.
  • Too-large values are scaled. When adjacent radii add up to more than the side length, the browser reduces all radii proportionally. That is why large values stop changing the shape.
  • Clip the content. Images inside a rounded box can poke out at the corners. Add overflow: hidden to the rounded element.
  • Size is not in the CSS. The box width and height only size the preview; set width and height (or aspect-ratio) on your own element.

When to use border-radius vs other shapes

border-radius keeps borders, box-shadows and backgrounds following the curve, which makes it the right choice for cards, buttons and avatars. For angular shapes such as hexagons, stars or arrows, use the clip-path generator. For a random organic outline as a standalone image, the SVG blob generator exports a reusable file.

Privacy

The shape and CSS are generated in your browser; nothing is uploaded.

Frequently asked questions

How do I round only the top corners?
Set Top left and Top right to your radius and the bottom corners to 0. The generator writes four values such as border-radius: 16px 16px 0 0, which is the usual pattern for cards with an image on top.
What does the slash in border-radius mean?
Values before the slash are horizontal radii and values after it are vertical radii. Using different numbers turns each corner into an elliptical curve instead of a circular one, which is how blob shapes are made.
Can I animate border-radius?
Yes. border-radius is animatable, including the 8-value form, so you can transition between two blob shapes with a CSS transition or keyframes for a morphing effect.
Why does 50% not give a pill shape on a button?
On a non-square element, 50% gives each corner a horizontal radius of half the width and a vertical radius of half the height, which forms an ellipse. Use a large fixed value such as 999px for pill ends.

Last updated October 3, 2026

Related tools

CSS Animation Generator Generate CSS @keyframes animations — fade, slide, zoom, bounce, pulse, shake, spin and more — with duration, delay, easing and loop controls. CSS Background Pattern Generator Generate repeating CSS background patterns — stripes, polka dots, checkerboard, grid, zigzag and more — using only gradients, no images. CSS Box Shadow Generator Design layered CSS box-shadows with sliders for offset, blur, spread, colour and opacity. Supports inset shadows, presets and a Tailwind class. CSS Button Generator Design a CSS button with colours, gradient, padding, radius, border, shadow and hover/focus states, then copy clean HTML and CSS. CSS Clamp Generator (Fluid Typography) Calculate a CSS clamp() value that scales font size or spacing smoothly between two viewport widths, with a table of computed sizes. CSS Clip Path Generator Draw CSS clip-path shapes: polygons with draggable points, stars, arrows, chevrons, circles, ellipses and inset rectangles, with live preview. CSS Filter Generator Combine CSS filter functions — blur, brightness, contrast, grayscale, hue-rotate, invert, saturate, sepia, drop-shadow — with a before/after preview. CSS Flexbox Generator Play with flex-direction, wrap, justify-content, align-items, align-content and gap on live boxes, and copy the flexbox CSS and HTML. CSS Formatter Beautify or minify CSS online. Expand compressed stylesheets into readable rules. CSS Gradient Generator Create linear, radial and conic CSS gradients visually with draggable colour stops, presets and a live preview, then copy the CSS or Tailwind class. CSS Grid Generator Build CSS grid layouts: fixed or responsive auto-fit columns, row sizes, gaps and alignment, with a live grid preview and copyable CSS + HTML. CSS Loader & Spinner Generator Create lightweight pure-CSS loading spinners — ring, dual ring, bouncing dots, bars and pulse — with custom colour, size and speed.