Border Radius Generator

Design custom rounded corners intuitively and copy the CSS or Tailwind instantly

Safe conversion with no data sent to server

Last updated: March 2026

Top Left12px
Top Right12px
Bottom Right12px
Bottom Left12px

CSS Output

border-radius: 12px;

Tailwind CSS

rounded-xl

Presets

CSS Border Radius Explained

The CSS border-radius property allows web developers to add rounded corners to HTML elements. It accepts values in pixels, percentages, rem, or em. You can apply the same radius to all four corners with a single value, or target each corner independently using the longhand syntax: border-top-left-radius, border-top-right-radius, border-bottom-right-radius, and border-bottom-left-radius. You can also provide two values per corner to create elliptical curves β€” perfect for organic, pill-shaped designs.

How to Make a Perfect Circle in CSS

To make a square element into a perfect circle, use percentage units instead of pixels. Setting border-radius: 50% tells the browser to curve each corner exactly halfway along each edge. For this to produce a circle (not an ellipse), the element must have equal width and height. This technique is widely used for avatar images, icon buttons, and circular badges. For non-square elements, border-radius: 50% produces an ellipse β€” to force a circle regardless, use border-radius: 9999px(a very large pixel value that exceeds the element's dimensions).

How to Use This Generator

Use the sliders to adjust the border radius for each corner independently or all at once. Toggle between pixel (px) and percentage (%) units depending on your design needs. The live preview updates in real time, and you can copy the generated CSS or the equivalent Tailwind class with a single click. This eliminates trial-and-error in your code editor and lets you visually achieve the exact shape you envision.

Responsive Rounded Corners

While using px guarantees exact curvature regardless of element size, % creates dynamic, scalable curves that shift proportionally with the container. Percentage border radii are recommended for responsive imagery and fluid layouts where element dimensions change at different breakpoints. For fixed-size UI components like buttons and badges, pixel values provide more predictable and precise corners.

Common Use Cases

  • Rounded cards and panels: border-radius: 8px to 16px for subtle softness
  • Pill-shaped buttons: use a large value like 9999px or 50% on a wider element
  • Circular avatars and icons: square element with border-radius: 50%
  • Asymmetric organic shapes: different values on each corner for creative hero sections
  • Rounded input fields: 4px–8px for modern form styling
  • Badge and tag components: slightly rounded corners with 4px–6px

FAQ

Can I animate border-radius in CSS?

Yes. border-radius is fully animatable using CSS transitions and animations. You can smoothly transition between a square and a circle on hover: transition: border-radius 0.3s ease. This is a popular effect for interactive buttons and shape-morphing animations.

What is the shorthand notation for four different corners?

The shorthand border-radius: 10px 20px 30px 40px sets top-left, top-right, bottom-right, and bottom-left in clockwise order. Two values: 10px 20px sets top-left + bottom-right, then top-right + bottom-left. Three values: top-left, then top-right + bottom-left, then bottom-right.

Is border-radius supported in all browsers?

Yes, border-radius is fully supported in all modern browsers including Chrome, Firefox, Safari, and Edge, with no vendor prefixes required. It has been universally supported since Internet Explorer 9 (2011), making it safe for all production use cases.