How do I generate CSS border-radius online?
Adjust per-corner sliders to set border-radius values for top-left, top-right, bottom-right, and bottom-left independently. See a live preview shape, toggle between px, %, and em units, and choose from presets like pill, circle, or blob. Copy the CSS with one click. Everything runs in your browser.
All corners: 12px
border-radius: 12px;
CSS Border Radius Generator
Design CSS border-radius visually. Adjust each corner independently or link them, choose units, and copy the CSS.
Preview Settings
CSS Output
border-radius: 12px;
Presets
About CSS Border Radius
The border-radius property rounds the corners of an element. You can set a single value for all corners or specify each corner individually.
Shorthand: border-radius: top-left top-right bottom-right bottom-left — values go clockwise from the top-left corner.
Units: Use px for fixed rounding, % for proportional rounding (50% on a square creates a circle), em/rem for scalable rounding relative to font size.
Pill shape: Set a very large pixel value (e.g. 9999px) on a rectangular element to create a fully rounded pill shape. This works because the radius is clamped to half the element's dimension.
Elliptical corners: CSS also supports separate horizontal and vertical radii using the border-radius: h-radius / v-radius syntax for asymmetric curves, though this generator focuses on circular (uniform) corners.
Tips & Best Practices
Use percentage for perfect circles and ellipses
border-radius: 50% on a square element creates a perfect circle. On a rectangle, it creates an ellipse. For pill-shaped buttons, use border-radius: 9999px — this guarantees fully rounded ends regardless of the element's height. Avoid using exact pixel values for pill shapes, as they break when content changes size.
Individual corner syntax has two notations — don't mix them
The shorthand border-radius: 10px 20px 30px 40px sets all four corners (top-left, top-right, bottom-right, bottom-left — clockwise from top-left). The longhand border-top-left-radius: 10px 20px sets horizontal and vertical radii for elliptical corners. Mixing shorthand clockwise order with the longhand properties causes unexpected results.
Superellipse (squircle) shapes for iOS-style icons
Apple's iOS icons use a superellipse, not border-radius. CSS can approximate this with border-radius values slightly less than 50%: try border-radius: 22% for a squircle effect. For pixel-perfect iOS icons, use SVG clip-path with a superellipse formula or the CSS clip-path: path() function.
Border radius clips content but doesn't clip pointer events
A rounded element still has a rectangular click area unless you add clip-path. An invisible corner region can still receive clicks, causing unexpected button presses or link activations. For circular buttons, match the clickable area with border-radius: 50% AND a clip-path or explicit pointer-events handling.
Frequently Asked Questions
How do I set different border-radius values for each corner in CSS?
How do I create a circle or pill shape with border-radius?
What is the difference between px and % values for border-radius?
Related Generate Tools
JSON Mock Data Generator
Generate realistic fake JSON data for API testing with 30+ field types, preset templates, and schema builder
README Generator
Generate professional GitHub README.md files with badges, installation steps, usage examples, and more
robots.txt Generator
Generate robots.txt files with crawl rules for Googlebot, Bingbot, AI bots, and more — presets included
Zod Schema Generator
Generate Zod validation schemas from JSON — auto-detects emails, URLs, UUIDs, dates, and nested objects