Embed this tool on your site
<iframe src="https://devtoolbox.dedyn.io/tools/css-border-radius-generator" width="100%" height="800" frameborder="0" title="CSS Border Radius Generator"></iframe>

CSS Border Radius Generator

Create custom CSS border-radius values visually with live preview. Supports simple 4-corner mode and advanced 8-value shorthand with independent horizontal and vertical radii. Choose from preset shapes or fine-tune each corner. Everything runs in your browser.

Preview
Top-Left
Top-Right
Bottom-Right
Bottom-Left
border-radius: 20px;
Browser Support: border-radius has 99%+ global support across all browsers.
Chrome 5+ Firefox 4+ Safari 5+ Edge 12+

How to Use the CSS Border Radius Generator

The CSS border-radius property rounds the corners of an element. This visual generator lets you experiment with all corner values and instantly see the results.

Simple Mode

In simple mode, each corner has a single value that applies equally to horizontal and vertical radii. Link corners together to change all four at once, or unlink to adjust each corner independently. Drag the sliders or type precise values into the input fields.

Advanced Mode (8 Values)

Advanced mode gives you independent horizontal (H) and vertical (V) radii for each corner. This uses the CSS slash syntax: border-radius: TL-H TR-H BR-H BL-H / TL-V TR-V BR-V BL-V. This lets you create elliptical corners and organic blob-like shapes that are impossible with simple values.

Units

Switch between px (pixels, fixed size), % (percentage of element dimensions), em (relative to font size), and rem (relative to root font size). Use 50% on a square element to make a perfect circle.

Using the Generated CSS

Copy the generated code and apply it to any HTML element:

.rounded-element {
  border-radius: 20px 50px 30px 10px;
  /* Or with separate H/V radii */
  border-radius: 20px 50px 30px 10px / 40px 60px 20px 50px;
}

Learn More

Dive deeper into CSS layout and styling techniques:

Frequently Asked Questions

What is CSS border-radius and how does the shorthand work?
CSS border-radius is a property that rounds the corners of an element's outer border edge. The shorthand accepts 1 to 4 values for each corner (top-left, top-right, bottom-right, bottom-left). You can also specify separate horizontal and vertical radii using the slash syntax: border-radius: 10px 20px 30px 40px / 50px 60px 70px 80px. The values before the slash set horizontal radii and the values after set vertical radii, allowing you to create elliptical corners.
How do I create a perfect circle with border-radius?
To create a perfect circle with CSS border-radius, set border-radius: 50% on an element that has equal width and height. For example: width: 100px; height: 100px; border-radius: 50%;. If the element is not square, using 50% will create an ellipse instead. You can also use a very large pixel value like border-radius: 9999px to ensure full rounding regardless of the element's dimensions.
What is the difference between px, %, em, and rem units for border-radius?
The px unit sets a fixed radius in pixels, giving consistent results regardless of element size. The % unit calculates the radius relative to the element's dimensions (width for horizontal, height for vertical), making it responsive. The em unit is relative to the element's font-size, while rem is relative to the root font-size (usually 16px). Use % for responsive designs, px for pixel-perfect control, and em/rem for typography-consistent spacing.
Can I animate CSS border-radius?
Yes, CSS border-radius is fully animatable using CSS transitions and keyframe animations. You can smoothly transition between different border-radius values, which is commonly used for morphing effects like transforming a square into a circle on hover. For best performance, combine border-radius animations with will-change: border-radius to hint at the upcoming change. Example: transition: border-radius 0.3s ease;
Keyboard Shortcuts
Ctrl+Shift+C Copy CSS
Ctrl+L Reset all
Ctrl+Enter Copy CSS