Border Radius Generator
Generate CSS border-radius values with visual preview for each corner. A previously-confirmed bug is now fixed: corner-radius inputs used to be hard-capped at 100px regardless of the preview's Width/Height, making the tool's own circle/pill workflow unreachable for any element over 200px — the cap now scales with your chosen Width/Height, so circle and pill shapes are reachable at any preview size.
Corner Values
Preview
8px
rounded
How to Use This Tool
Adjust corner radius values individually or lock for uniform corners
each corner's maximum now scales with your chosen Width/Height, so a circle or pill shape is reachable at any preview size.
View the live preview updating as you adjust sliders.
View the live preview updating as you adjust sliders.
Pro Tip
For a true pill or capsule-shaped button in raw CSS, set border-radius to a value at least half the element's height (like 9999px, a common convention) rather than calculating the exact pixel value by hand — CSS automatically caps the effective radius at 50% of the shorter dimension, so an intentionally oversized value always produces a perfect pill shape regardless of the button's actual height. This generator's corner inputs now scale their ceiling with your chosen Width/Height, so you can dial in the exact half-dimension value (or higher) directly inside the tool for any element size, not just buttons under 200px tall. It's also worth noting that changing an element's padding later can subtly shift how rounded it looks relative to its size, since the same absolute radius value reads as more or less rounded depending on the overall element dimensions surrounding it, a relationship worth keeping in mind when scaling a component up or down across different breakpoints, viewport sizes, and content densities within the same design system. Revisiting the radius value any time a component's padding or font size changes significantly is a good habit for keeping a design system's rounded-corner scale looking consistent across differently sized variants of the same component.
About This Tool
When to Use
- Rounding a card or button's corners to precisely match a specific design system's established border-radius scale
- Creating an organic, asymmetric blob shape using four independently different corner radius values for a decorative section
- Building a speech-bubble or tooltip shape by setting one corner to a sharp point while rounding the remaining three corners
Key Details
A border-radius generator provides a visual, per-corner control panel for CSS border-radius, letting you drag each of the four corners independently or link them together, with a live preview box upda...
Worked example
Setting top-left 24px, top-right 8px, bottom-right 24px, bottom-left 8px generates border-radius: 24px 8px 24px 8px; — an alternating rounded/sharp pattern on opposite corners that creates a subtle asymmetric, organic feel rather than the uniform rounding a single radius value would otherwise produce across all four corners. Setting all four corners to a matching 16px instead produces the more conventional, uniformly rounded card look most design systems default to for standard content containers. Trying a value of 0 on just the top-left corner while leaving the other three at 16px instead creates a distinctive flag or tab shape often used for a highlighted callout box.
Interpreting your result
The shape label under the live preview (rounded, pill, circle, or custom) reflects what your current corner values actually produce at your chosen Width/Height — trust that label over assumptions, since the same corner value reads differently depending on the element's dimensions. If you're aiming for 'circle' or 'pill', push a corner value up to at least half your smaller dimension (Width or Height, whichever is less) — the input's ceiling now scales with your chosen dimensions, so this is reachable at any preview size, unlike the previous fixed 100px cap.
Border Radius Generator FAQ
What is border-radius in CSS?
border-radius is a CSS property that rounds the corners of an element. You can set all corners to the same value (border-radius: 8px), or control each corner individually (border-radius: 10px 5px 10px 5px for TL, TR, BR, BL).
How do I create a circle with border-radius?
In raw CSS, set border-radius to 50% on a square element (equal width and height) to create a perfect circle. This generator's corner-radius inputs now scale their maximum with your chosen Width/Height, so the live preview can demonstrate a true circle at any square size you enter — set Width and Height equal, then push every corner up to at least half that dimension.
What is the difference between a pill and a circle shape?
A pill shape has such extreme rounding that the ends are semicircles — this happens when all corners are at least 50% of the shorter dimension on a rectangular element. A circle requires a square element with 50%+ rounding on all corners.
How do I round only one corner?
Use the per-corner controls (top-left, top-right, bottom-right, bottom-left sliders). Set only the corners you want to round to non-zero values. The CSS generator will output the correct four-value shorthand.
Can I use percentage values for border-radius?
Yes. Percentage values are relative to the element's dimensions: 50% on a square creates a circle. However, on non-square elements, percentage values apply differently per axis. This generator uses px values for predictable results, but you can manually edit the CSS output.
What's the difference between border-radius and clip-path for rounding?
border-radius rounds the corners of an element's background and border box — it's a styling property that affects rendering. clip-path can create any arbitrary shape (including rounded rectangles, circles, ellipses, and polygons) by clipping the visible area. For simple rounded corners, border-radius is simpler and more performant. Use clip-path when you need non-rectangular shapes like rounded-top-only or custom paths.
Master Your Entire Toolkit
Access 500+ specialized calculators and tools designed for precision. No sign-up required, 100% free.
Built and reviewed by the Toolzip Team · Based on MDN Web Docs — Border Radius