Skip to content

Design

CSS Border Radius Generator

CSS Border Radius Generator

Beta

Set each corner radius with a live preview and copy the CSS. Switch between pixels and percentages, link the corners, and get the matching Tailwind class when one exists.

  • Free, no sign-up
  • Updated
  • Reviewed by Olgun Ozoktas


border-radius: 12px;

Tailwind ships a fixed radius scale, so a class is offered only when your value matches one exactly. Any other value needs arbitrary syntax such as rounded-[18px].

How to generate a CSS border radius

  1. Pick a unit

    Pixels give a fixed radius that stays the same at any element size. Percentages scale with the element, and 50% on every corner produces an ellipse.
  2. Set the corners

    Leave the corners linked to round all four together, or unlink them to shape each one. The preview updates as you drag.
  3. Try a preset

    Sharp, Subtle, Card, Pill, Circle and Leaf cover the common shapes. A preset unlinks the corners so you can adjust from there.
  4. Copy the CSS

    Copy the declaration straight into your stylesheet. When the value matches Tailwind's scale exactly, the matching class is offered beside it.

Common Use Cases

Cards and panels

Match an existing design system's corner radius without opening dev tools on a live page.

Pill buttons and badges

A very large pixel radius caps at half the element height, which is how a pill shape is made without knowing the height.

Avatars and circular crops

50% on all four corners makes a circle for a square element and an ellipse for a rectangle.

Asymmetric shapes

Speech bubbles and leaf shapes need different corners. The unlinked mode writes the shorthand in the right order.

Why use a border radius generator?

Rounding a corner is one line of CSS and still costs a reload every time you guess. Four corners multiply that: an asymmetric shape needs the values in the right order, and the shorthand order (top-left, top-right, bottom-right, bottom-left) is easy to get wrong. This page previews the shape as you drag, writes the shorthand for you, and collapses to the short form when all four corners agree. It runs entirely in the browser.

The border-radius property looks simple until you need four different corners. The shorthand takes its values clockwise from the top left, a value larger than half the element is silently clamped, and a percentage is resolved against the element's own box rather than a fixed length. Each of those is easy to get wrong by one reload.

This generator shows the shape while you drag and writes the declaration underneath. When all four corners agree it emits the single-value short form; when they differ it emits the four-value shorthand in the correct order. The unit switch matters more than it looks: pixels hold their radius at any size, while percentages scale with the element and turn a square into a circle at 50%.

A Tailwind class is offered only when your value matches the framework's fixed scale exactly, because suggesting rounded-lg for 13px would be wrong. Everything runs in your browser. For the rest of the CSS surface, the Box Shadow Generator, Gradient Generator and Glassmorphism Generator follow the same shape.

How it compares

Dev tools let you drag a radius on a live page, which is excellent for an element that already exists and useless when you are writing the rule first. A generator gives you the declaration before the markup, and shows all four corners at once rather than one at a time.

This page is deliberately narrow: it writes border-radius and nothing else. It does not generate a whole component, and the Tailwind hint is withheld rather than approximated when your value is off the scale.

Border Radius Tips

  • The shorthand order is top-left, top-right, bottom-right, bottom-left - clockwise from the top left. Getting it backwards is the most common mistake.
  • A radius larger than half the element is clamped by the browser, so a huge pixel value is a reliable way to get a pill shape at any height.
  • Percentages are relative to the element's own width and height, so the same percentage looks different on a square and on a wide rectangle.
  • Rounding a parent does not clip a child. Add overflow: hidden to the parent when an image or background should follow the curve.
  • Your values stay in the browser and nothing is uploaded to FindUtils. The page itself is not request-free: like the rest of the site it loads advertising and analytics scripts.

Frequently Asked Questions

What order do the four values go in?

Clockwise from the top left: top-left, top-right, bottom-right, bottom-left. When all four match, the single-value short form means the same thing, and this page emits it automatically.

How do I make a perfect circle?

Use 50% on all four corners. On a square element that is a circle; on a rectangle it is an ellipse. If you want a circle from a rectangle, make the element square first.

How do I make a pill button?

Use a pixel radius far larger than the element can use, such as 999px. Browsers clamp the radius to half the smaller dimension, so the ends round fully at any height without you knowing the height.

What is the difference between px and %?

A pixel radius is fixed and looks identical whatever the element's size. A percentage resolves against the element's own width and height, so it scales, and the same value reads differently on a square and a wide box.

Why does my image ignore the rounded corners?

Because border-radius rounds the element, not its children. Add overflow: hidden to the rounded parent, or apply the same radius to the image itself.

Why is there no Tailwind class for my value?

Tailwind's radius scale is fixed, so only exact matches get a class. For anything else use arbitrary syntax such as rounded-[18px] rather than rounding your design to the nearest class.

Is the generated CSS production ready?

Yes. border-radius has been supported without a prefix in every current browser for many years, and the output is a plain declaration you can paste into a stylesheet.

Is anything uploaded?

No. The values live in your browser and no request carries them. Third-party analytics and ads load on the page, as on the rest of the site.

Rate This Tool

0/1000

Get Weekly Tools

Suggest a Tool