Developer Tool

Border Radius Generator — Live CSS Corner Rounding Tool

Drag four corner sliders, watch the preview update instantly, and copy the exact border-radius CSS you need.

Check this to move all four corners together with one slider.
Tip: Uneven corners (a slightly different value on each side) create the soft, organic "blob" shapes popular in modern hero sections and cards.

A border radius generator is the fastest way to round the corners of any box, button, image or card without guessing pixel values in your CSS file. This tool gives you four independent sliders — one per corner — a live preview box that updates as you drag, and a ready-to-copy CSS snippet using the real border-radius property. Rounded corners are one of the most-used visual details in modern web design, and getting the exact curve right by trial and error in dev tools wastes time that a visual generator removes entirely.

Cards, buttons, avatars, modals and hero images all need consistent, deliberate corner rounding. Dialing it in visually is faster and more accurate than typing values blind and refreshing the browser, and the output here is plain CSS you can paste anywhere.

What This Border Radius Generator Does

This tool controls all four corners of a box independently: top-left, top-right, bottom-right and bottom-left, matching the exact order CSS uses internally. Each slider runs from 0 (a sharp square corner) up to 120 units, and the preview box above updates in real time as you move any slider — so you always see exactly what your rounded corners will look like before you touch your stylesheet. When all four sliders share the same value, the generator automatically collapses the output to the clean single-value shorthand (border-radius: 24px;) instead of writing out four repeated numbers, which keeps your CSS tidy.

You can switch the output unit between pixels, percent and rem. One thing to know: changing the unit does not convert the numbers. A slider at 24 means 24px, 24% or 24rem depending on the dropdown, and 24rem is roughly 384px at a 16px root size, which is large enough to turn a small box into a pill or circle. The sliders always run 0 to 120, so for percent only values up to 50 change the shape, because anything higher is scaled down by the browser.

How to Use the Border Radius Generator

  1. Drag the four sliders. Move top-left, top-right, bottom-right and bottom-left independently to shape the preview box exactly how you want it.
  2. Use "Link all corners" for a quick uniform radius. Check the box and one slider will drive all four corners together — ideal for standard rounded cards and buttons.
  3. Pick your unit. Choose px for pixel-precise rounding, % for corners that scale relative to the box itself (useful for perfect circles/pills), or rem for rounding tied to your base font size.
  4. Watch the live preview. The box above the output updates instantly with every slider movement, so there's no guesswork.
  5. Copy the CSS. Click "Copy CSS" and paste the generated border-radius declaration directly into your stylesheet, component, or inline style.

The Border-Radius Property, Explained

CSS's border-radius property accepts one to four values, always applied in the order top-left, top-right, bottom-right, bottom-left — the same clockwise order this tool uses internally, starting from the top-left corner. As MDN's border-radius reference documents, a single value like border-radius: 24px; rounds all four corners equally, while four values like border-radius: 8px 24px 8px 24px; round each corner independently for asymmetric shapes. Each corner can also technically take two values (horizontal and vertical radius, separated by a slash) to produce elliptical rather than circular corners — that form is how true organic blob shapes are written. This generator outputs one circular radius per corner and does not write the slash form, so add the second value by hand if you need elliptical corners.

Percentages are relative to the box itself: per MDN, horizontal radii use the width and vertical radii use the height. That is why border-radius: 50%; on a square gives a perfect circle (each corner radius is half the side) and on a rectangle gives an ellipse.

Worked Example: the Default Setting

The preview box is 180 x 180 px and the default is Link all corners with 24 in each slider and px as the unit. Output: border-radius: 24px;. Because all four values match, the tool collapses them to the one-value shorthand. Each corner curves over 24px, leaving 180 − 24 − 24 = 132px of straight edge on every side.

Change the unit to % without touching the sliders and the same 24 becomes 24% of 180 = 43.2px, a much rounder box. Change it to rem and 24rem is about 384px per corner; that is more than the 180px side, so the browser scales every radius down to 90px and you get a circle. Back in px, set top-left to 60 and the others to 20 (unlink first) and the output is border-radius: 60px 20px 20px 20px;, in the order top-left, top-right, bottom-right, bottom-left.

Common Border Radius Patterns

A few corner-rounding patterns come up again and again in real interface design, and this generator makes each one quick to dial in:

  • Subtle card rounding (6–12px) — the standard for cards, panels and containers in most modern design systems; enough to soften edges without looking playful.
  • Pill buttons — set the radius to half the button's height, or use a very large pixel value such as 9999px, to get a capsule-shaped button. Avoid 50% here: on a wide button it gives an ellipse, not a pill.
  • Perfect circles — link all corners and set the unit to % at value 50 on a square box (equal width and height) for avatars, icon buttons and badges.
  • Asymmetric "blob" shapes — set each corner to a noticeably different value (for example 60px 20px 60px 20px) to create the organic, hand-drawn feel popular in hero sections and illustrations.
  • Speech-bubble corners — round three corners generously and leave one corner sharp (0) to create a pointer-like tail effect, often combined with a small triangle pseudo-element.

Border Radius and Browser Support

Border-radius needs no vendor prefixes or fallbacks. MDN lists it as Baseline "widely available", supported across browsers since July 2015, so the CSS this generator outputs can be shipped as it is. One nuance: border-radius rounds the box's own background and border. If an image or other child overflows the rounded box, also add overflow: hidden; to the parent so the child is clipped to the same curve.

Border Radius vs. Clip-Path

Border-radius handles rectangular boxes with rounded corners extremely well, but it can't produce every shape. For more complex geometry — triangles, hexagons, stars, or diagonal cuts — CSS's clip-path property is the right tool instead, since it can clip an element to an arbitrary polygon or path rather than just softening corners. For the vast majority of UI work — cards, buttons, images, modals, avatars, inputs — border-radius is simpler, better supported for animation, and the correct default choice; reach for clip-path only when the shape genuinely isn't rectangular.

How to Read the Result and What to Do Next

  • Check the shape at your real size. A radius that looks right on this 180px box can look very different on a 40px button. Percent scales with the element, pixels do not.
  • Pick a small set of values and reuse them. Many design systems settle on a handful of steps (for example 4, 8, 16 and a pill). Choosing them once beats picking a new number per component.
  • Paste, then test the edge cases. Add the CSS to a class, check nested images (overflow: hidden), focus outlines and any hover transition.
  • Need a non-rectangular shape? If you want more than rounded corners, switch to clip-path rather than stretching border-radius.
Building out a full design system, not just one component?

Consistent corner radii, spacing and color are small details that compound into a site that feels premium. Arb Digital designs and builds fast, cohesive websites where every detail — including the corners — is deliberate.

Explore Web Design Services All Free Tools

Common Mistakes to Avoid

  • Forgetting overflow:hidden on nested content. Rounding a container doesn't automatically round a child image or element that overflows its bounds — add overflow: hidden; to the parent.
  • Mismatched radii across a component set. Buttons, inputs and cards on the same page should generally share the same radius scale (e.g. 6px, 12px, 24px) for visual consistency — random values per component look unpolished.
  • Using % for non-square elements expecting a circle. A 50% radius only produces a true circle when width equals height; on a rectangle it produces an ellipse or stadium shape instead.
  • Over-rounding small elements. When adjacent radii add up to more than a side, the browser shrinks all the radii by the same factor (CSS Backgrounds spec, Overlapping Curves). Values beyond about half the shortest side add nothing, and a single large corner can flatten the others.
  • Ignoring focus and hover states. If a button's radius changes on interaction, make sure the transition on border-radius is smooth rather than an abrupt jump, which this preview lets you check visually.

Related Free Tools From Arb Digital

Pair this generator with the CSS gradient generator and the box shadow generator to build a complete card or button style in minutes. If you're picking colors for the box background, the HEX to RGB converter and RGB to HEX converter handle color-format conversion, and the CSS flexbox generator and CSS grid generator help lay out the containers these rounded boxes live inside. Browse everything at our free online tools hub.

Pixels, Percentages and the Pill Shape Trick

A radius given in pixels is absolute: border-radius: 12px curves every corner by the same 12 pixels no matter how big the box grows, which keeps buttons and cards looking consistent across a design system. A radius given as a percentage is relative to the element's own dimensions, and that unlocks shapes pixels cannot. Set border-radius: 50% on a square and you get a perfect circle; set it on a wide rectangle and you get an ellipse. Set border-radius: 9999px (a huge pixel value) on a button and you get the popular "pill" shape, because the radius is capped at half the shorter side no matter how absurd the number.

The practical takeaway is to match the unit to the intent. Use pixels for the subtle, fixed rounding of cards, inputs and modals where you want the same gentle curve everywhere. Use 50% when you specifically want a circle or ellipse that tracks the element's size — avatars, icon badges, dots. Reach for the giant-pixel pill trick for tags and call-to-action buttons. Knowing which tool produces which effect stops the frustrating trial-and-error of nudging numbers until something looks right.

Frequently Asked Questions

How do I round only some corners of a box in CSS?

Use the four-value form of border-radius, in order: top-left, top-right, bottom-right, bottom-left. Set the corners you don't want rounded to 0. For example, border-radius: 12px 12px 0 0; rounds only the top two corners, which is common for cards that sit flush against the bottom of a section.

How do I make a perfect circle with border-radius?

Give the element equal width and height, then set border-radius to 50% (or use the "Link all corners" option here with the unit set to %). Because the radius is calculated relative to the box's own size, a 50% value on a square element produces a perfectly round circle every time.

What's the difference between px, %, and rem for border-radius?

Pixels give a fixed, absolute curve that doesn't scale with the element. Percent is relative to the element's own width/height, so it scales proportionally as the box resizes — useful for circles and pills. Rem is relative to the root font size, so rounding scales if a user changes their browser's base text size, which can help with accessibility.

Does border-radius work on background images and child elements?

By default, border-radius only clips the element's own background and border. To also clip an overflowing child image or element to the same rounded shape, add overflow: hidden; to the parent container alongside the border-radius declaration.

Do I need vendor prefixes for border-radius in 2026?

No. MDN marks border-radius as Baseline widely available, supported in all major browsers since July 2015, with no prefix needed. You can copy the CSS from this generator straight into production with no fallback.

Can I animate border-radius changes?

Yes. Because border-radius is a standard animatable CSS property, you can transition it smoothly with transition: border-radius 0.2s ease; — for example, morphing a square button into a pill shape on hover, or rounding a card further when it's active.

Why does my box turn into a circle when I switch the unit to rem?

Switching the unit does not convert the slider numbers. 24 becomes 24rem, about 384px at a 16px root size, which is larger than the box. The browser scales the radii down until they fit, so a square becomes a circle. Switch back to px or lower the values.

This tool runs entirely in your browser — nothing you enter is uploaded or stored.

Want this handled for you?

Looking for something else? Browse all free tools by category.