Border Radius Generator
Generate CSS border radius with visual preview
Inputs
Provide the following 4 values to run the Border Radius Generator:
- Top Left (px) [number] — default 8
- Top Right (px) [number] — default 8
- Bottom Right (px) [number] — default 8
- Bottom Left (px) [number] — default 8
What it calculates
This tool returns:
- CSS Border Radius — primary result
- Uniform Corners
- Shape Type
Worked example
For the sample inputs below:
- Top Left (px): 8
- Top Right (px): 8
- Bottom Right (px): 8
- Bottom Left (px): 8
the Border Radius Generator produces:
- CSS Border Radius: 8px
- Uniform Corners: Yes
- Shape Type: Rounded
How it works
The result is derived through the following steps:
isUniform = topLeft === topRight && topRight === bottomRight && bottomRight === bottomLeftcss = isUniform ? `${topLeft}px` : `${topLeft}px ${topRight}px ${bottomRight}px ${bottomLeft}px`shape = isUniform && topLeft > 50 ? 'Pill/Circle' : isUniform ? 'Rounded' : 'Custom'
Frequently Asked Questions
What is a border radius generator?
A border radius generator is a tool that allows designers to create and customize CSS border radius values visually, with instant previews.
How do I use the Border Radius Generator?
Simply adjust the slider or input your desired pixel value for each corner of your element to see a live preview and the corresponding CSS code.
Are there any browser compatibility issues with border radius?
Most modern browsers support border radius properties. However, for older browsers, ensure that you include vendor prefixes like -webkit- or -moz-.
Can I copy the CSS code directly from the tool?
Yes, you can easily copy the generated CSS code from the tool for use in your web projects.
Is there a limit to how many corners I can adjust?
No, you can adjust the border radius for all four corners independently, providing maximum customization for your designs.