CSS Border Radius Generator
Create CSS rounded corners and custom border radius styles with a real-time preview.
Border Radius Preview
Visual preview of your border radius
Border Radius Controls
Adjust radius values for each corner
Box Properties
Customize the preview box
Border Radius Tips
Quick tips and examples for using border-radius effectively
Perfect Circle
Use equal width and height with border-radius: 50%
Rounded Button
Subtle rounding with border-radius: 4px
Organic Shape
Complex shapes using percentages and different values for each corner
Category Hub
Category Essentials
Developer tool searches often overlap across formatting, validation, and quick code generation. These links surface the strongest utility pages first so users can continue the workflow in one section.
Related Tools
Daily Inspiration
The pen is mightier than the sword. - Edward Bulwer-Lytton
CSS Border Radius Generator - Create Rounded Corners CSS
Generate CSS Border Radius
We designed this tool to help you instantly generate the CSS code needed for rounded corners. Whether you are softening the edges of a button, creating a circular profile picture, or designing a complex organic shape, our generator provides the exact border-radius declaration you need. Just adjust the settings to your liking and copy the code directly into your stylesheet.
*(Tool Interface Placeholder)*
- Preview: Live Preview Box
- Controls: Top-Left Radius Top-Right Radius Bottom-Right Radius Bottom-Left Radius
- Units: [px] [%] [em] [rem]
- Output: Copy CSS Reset
How to Use the Border Radius Generator
We have kept the process simple so you can get the look you want without the hassle.
- Adjust the radius: Use the sliders or input fields to set the curvature. You can set a uniform radius for all corners or uncheck the "link" option to control each corner individually.
- Choose your unit: Select between pixels (
px) for fixed sizes or percentages (%) for responsive shapes. - Copy the CSS: Once the preview looks right, click the button to copy the code snippet.
What is border-radius in CSS?
The border-radius property allows you to round the corners of an element's outer border edge. It is one of the most commonly used CSS properties for modernizing a design. By default, HTML elements are rectangular boxes with sharp 90-degree corners. This property curves those corners, cutting off the background and border to create a softer shape.
Border-radius syntax
The syntax can range from simple to complex depending on how many corners you want to target.
1 value (Uniform)
If you provide a single value, it applies to all four corners equally. border-radius: 10px;
2-4 values (Different corners)
You can specify different values for the top-left, top-right, bottom-right, and bottom-left corners (in that order). border-radius: 10px 20px 30px 5px;
- 10px = Top-Left
- 20px = Top-Right
- 30px = Bottom-Right
- 5px = Bottom-Left
Elliptical border radius (slash syntax)
Did you know corners don't have to be perfect quarter-circles? Using the slash / syntax, you can define separate horizontal and vertical radii. This creates elliptical (stretched) corners.
Example: border-radius: 50px / 20px;
This tells the browser to use a 50px radius horizontally and a 20px radius vertically, resulting in a flattened curve.
Common use cases
Here are a few standard patterns we see developers using all the time.
- Button corners: A small radius (typically
4pxto8px) makes buttons feel friendlier and more clickable. - Cards: A moderate radius (like
12pxor16px) combined with a box shadow creates the standard "card" UI used in most modern apps. - Circles and Ovals: Setting
border-radius: 50%;on a square element creates a perfect circle. On a rectangular element, it creates an oval.
Organic/Blob shapes
By using 8 values (using the slash syntax to define horizontal and vertical radii for all four corners independently), you can create "organic" or "blob" shapes that look imperfect and natural. These are great for creative backgrounds or masking images.
Example: border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
Troubleshooting
My radius isn't visible. Ensure the element has a background-color or a border so the edges are visible. Also, check if the element is large enough to show the curve; if the radius is larger than the element itself, it might look odd.
The corners are clipped weirdly. If you have child elements inside your rounded container (like an image inside a div), they might bleed out over the corners. Apply overflow: hidden; to the parent container to mask the child elements to the curve.
My circle isn't a perfect circle. For border-radius: 50% to create a perfect circle, the element must be a perfect square (equal width and height). If the width and height differ, you will get an oval.
Frequently Asked Questions
What does border-radius do in CSS?
It defines the radius of the element's corners, effectively rounding off the sharp edges of the background and border.
How do I set different radius values for each corner?
You can list up to four values in the property. The order is top-left, top-right, bottom-right, and bottom-left.
What is the slash (/) syntax in border-radius?
The slash separates horizontal radii from vertical radii. It allows you to create elliptical or skewed corners rather than perfectly symmetrical circular ones.
How do I make a circle with CSS border radius?
Set the width and height to the same value (to make a square), and then set border-radius: 50%;.
Should I use % or px for border radius?
Use px (pixels) if you want the curve to stay the same size regardless of the element's size (like a button). Use % if you want the curve to scale with the element (like making a responsive circle).
Why isn't my border radius showing?
Common reasons include: missing background color, the element being replaced by native OS controls (like some form inputs), or another CSS rule overriding it.
How do I create blob/organic shapes with border radius?
You use the 8-value syntax. This involves defining different horizontal and vertical radii for every single corner to create an irregular, non-symmetrical shape.
What are logical border-radius properties for RTL?
If you are building for multi-language sites (LTR and RTL), consider using logical properties like border-start-start-radius instead of border-top-left-radius. This ensures the corners flip correctly based on the language direction.
Related Tools:
- CSS Box Shadow Generator - Add depth to your rounded cards.
- CSS Gradient Generator - Create modern backgrounds for your buttons.
- CSS Minifier - Compress your stylesheet for faster loading.
