Border Radius Generator – Visual CSS Corner Maker

Generate CSS border-radius values visually. Drag sliders, preview rounded corners live, and copy the CSS in one click. Free, no sign-up, runs in your

Radius16px

Preview

CSS
border-radius: 16px 16px 16px 16px;

Set rounded corners visually, copy the CSS in one click

Drag a slider, watch the shape update live, then grab the border-radius CSS line and paste it straight into your stylesheet. No mental arithmetic, no trial-and-error refreshing the browser.

The shorthand you're building looks like this:

border-radius: top-left top-right bottom-right bottom-left;

Set all four values to 50% and you get a perfect circle (or an ellipse if the element isn't square). Any other mix of values gives you asymmetric, pill, or squircle shapes.

How to use the border radius generator

  1. Adjust the sliders – each one controls one corner (top-left, top-right, bottom-right, bottom-left).
  2. Watch the live preview – the box updates instantly so you see exactly what your visitors will see.
  3. Switch units if you need to – choose px for fixed sizes or % for fluid, responsive designs.
  4. Copy the CSS – hit the copy button and paste the rule into your stylesheet or CSS-in-JS component.

Worked example – a card with soft corners

Say you want a content card with gently rounded top corners and sharper bottom corners – common for tab panels or pricing cards.

Sliders set to: top-left 12px, top-right 12px, bottom-right 4px, bottom-left 4px

Output CSS:

border-radius: 12px 12px 4px 4px;

Paste that onto your .card class and you're done. Want a pill button instead? Set all four corners to 50px (or higher than half the element height) and the generator will produce:

border-radius: 50px;

How to apply border-radius in code

Once you have the value from the generator, dropping it into your project takes one line in any language or framework.

Plain CSS / SCSS

/* CSS */
.card {
  border-radius: 12px 12px 4px 4px;
}
/* SCSS variable example */
$radius-top: 12px;
$radius-bottom: 4px;

.card {
  border-radius: $radius-top $radius-top $radius-bottom $radius-bottom;
}

JavaScript (inline style or CSS-in-JS)

// Vanilla JS inline style
document.querySelector('.card').style.borderRadius = '12px 12px 4px 4px';

// React / styled-components
const Card = styled.div`
  border-radius: 12px 12px 4px 4px;
`;

Tailwind CSS – if your values match Tailwind's scale, use a utility class like rounded-xl. For custom values, add them to tailwind.config.js under borderRadius or use the arbitrary-value syntax: rounded-[12px_12px_4px_4px].

How it works under the hood

The generator reads each slider value, formats them as a valid CSS shorthand, and renders the shape using the browser's own CSS engine – no canvas drawing, no images. Redundant values are collapsed automatically: if all four corners match, you get border-radius: 12px instead of border-radius: 12px 12px 12px 12px.

The border-radius property follows the CSS Backgrounds and Borders Module Level 3 spec (W3C). MDN's border-radius reference is the best bookmark for advanced syntax like the elliptical / notation.

Your data never leaves your browser. Everything runs locally in JavaScript – no values are uploaded to any server.

When to use this tool (and when not to)

SituationBest approach
Quickly prototyping corner styles for a componentUse this generator – fastest feedback loop
Building a design system with a fixed radius scaleDefine tokens in your design tool, then code them once
Need elliptical corners (e.g. a leaf or egg shape)Use the CSS / syntax: border-radius: 50% 50% / 60% 40% – the generator covers standard corners; add the / notation manually
Animating corners on hoverSet transition: border-radius 0.3s ease; alongside your generated value
SVG shape roundingUse SVG's rx/ry attributes instead – CSS border-radius doesn't apply to SVG elements the same way

Quick tips for common shapes

  • Circle: all corners at 50% on a square element
  • Pill / capsule: all corners at a value larger than half the element's height (e.g. 100px on a 40px-tall button)
  • Squircle feel: try 30% on all corners – popular in iOS-style icon designs
  • Tab shape: top corners rounded (8px), bottom corners at 0
  • Speech bubble base: three rounded corners, one at 0

Set your corners visually above, copy the single CSS line, and ship it. The border radius generator above does all the maths so you can focus on the design.

Frequently asked questions

Is the border radius generator free to use?+
Yes, completely free. No sign-up, no account, no usage limits. Open the page and start adjusting corners straight away.
Does my data get uploaded or stored?+
Nothing is sent to a server. The tool runs entirely in your browser, so your CSS values and any preview content stay private on your device.
What's the difference between px and % for border-radius?+
px values are fixed – a 8px radius always looks the same regardless of the element's size. % values are relative to the element's dimensions, so 50% always produces a circle on a square element. Use px for consistent UI components; use % when elements resize responsively.
How do I make a perfect circle with border-radius?+
Set all four corners to 50% on an element that has equal width and height (e.g. width: 100px; height: 100px;). The result is border-radius: 50%;. If the element isn't square, you'll get an ellipse instead.
What is the CSS border-radius shorthand order?+
The four-value shorthand goes clockwise from the top-left: border-radius: top-left top-right bottom-right bottom-left;. If you only supply two values, the first applies to top-left and bottom-right, the second to top-right and bottom-left – the same diagonal-pairs rule CSS uses for padding and margin.
Can I use this generator for Tailwind CSS projects?+
Yes. Copy the pixel or percentage value from the generator, then use Tailwind's arbitrary-value syntax in your HTML: class='rounded-[12px]' for uniform corners, or add a custom value to the borderRadius section of your tailwind.config.js.
What is the elliptical border-radius / notation for advanced shapes?+
CSS supports a two-radius syntax using a slash: border-radius: 40px 20px / 20px 40px;. The values before the slash set the horizontal radii; those after set the vertical radii. This lets you create egg, leaf, and teardrop shapes. The generator covers the standard four-corner shorthand; add the / notation manually for elliptical effects.
Does border-radius work on images and buttons?+
Yes – border-radius works on any HTML element, including <img>, <button>, <div>, and <input>. For images, pair it with overflow: hidden; on the parent if the image corners aren't clipping as expected.