Visually adjust rounded corners with live preview and CSS code to copy.
Vertical radii:
{{ cssOutput }}
The CSS property border-radius rounds the corners of an element. You can set a uniform radius for all four corners or style each corner individually. The shorthand follows the order: top-left, top-right, bottom-right, bottom-left.
With the extended syntax border-radius: H1 H2 H3 H4 / V1 V2 V3 V4 you can define a horizontal and vertical radius for each corner. This creates elliptical curves that produce more organic shapes.
border-radius: 50% on a square element.border-radius: 9999px for rounded buttons.border-radius: 8px to 16px for modern card designs.The border-radius property is defined in CSS Backgrounds and Borders Module Level 3 and accepts one to four length values, plus an optional second set after a slash. The shorthand border-radius: 8px; is equivalent to border-radius: 8px 8px 8px 8px; and applies clockwise starting top-left. Values can be px, %, em, rem, or vw — percentages refer to the box's width (horizontal) or height (vertical). Negative values are invalid and clamped to 0.
Elliptical corners need the slash syntax: border-radius: 50px 20px / 30px 10px; means horizontal radius 50 px for TL/BR and 20 px for TR/BL, vertical radius 30 px for TL/BR and 10 px for TR/BL. This notation comes from SVG, where each corner carries its own ellipse half-axis. It produces droplet or blob shapes without SVG, purely in CSS — perfect for hero sections and onboarding illustrations.
border-radius interacts with other properties: outlines now follow the rounding in modern Chromium and Firefox (older versions clipped). overflow: hidden is mandatory if child elements should respect the rounding — otherwise images or backgrounds stick out. With very large values (>= 50% of the shorter side) you get a pill or circle. Browsers also accept border-radius: 9999px as a common pill idiom because the value is clamped to the maximum sensible size internally.
A few tricks help you get from design concept to production CSS in 30 seconds.
border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; produces an organic blob shape popular in marketing designs.var(--radius-md). This keeps your design system consistent.These snippets cover the most important UI patterns.
border-radius: 12px; is the clean default for Bootstrap / Material cards.border-radius: 9999px; fully rounds — perfect for CTAs and tag chips.width: 48px; height: 48px; border-radius: 50%; — only with a square box does 50% yield an exact circle.border-radius: 16px 16px 16px 0; produces a rounded bubble pointing to the bottom-left.border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%; — popular in modern hero sections and decorative elements.border-radius itself is GPU-accelerated in modern browsers and costs effectively zero render time. Things change once you combine rounded corners with overflow: hidden containing animated content or filter effects — the compositor then has to apply a mask, which can cause frame drops on older mobile devices. Also avoid border-radius on position: fixed elements combined with backdrop-filter: blur(); that is often glitchy on Safari. When printing, some browser print stylesheets ignore border-radius — if your layout is meant to print, test explicitly. Very small radii (1–2 px) often render fuzzy on high-DPI displays because anti-aliasing lacks pixels — either drop them or use at least 4 px. Finally: WCAG doesn't require any specific radius, but heavily rounded buttons must still offer a clear hit target (at least 24x24 CSS pixels).
img element, border-radius must be set directly on the image or on its container with overflow: hidden. For background-image, border-radius on the container is enough.50% rounds relative to the box — a 200x100 box becomes an ellipse, a square becomes a circle. 9999px is absolute and clamped internally to 50% of the shorter side — rectangular boxes become pills, squares become circles. 9999px is more robust when box dimensions change.table, but inner td/th ignore it with border-collapse: collapse. Set border-collapse: separate; border-spacing: 0; or round the container instead of the table itself.transition: border-radius 200ms ease; works for hover effects. For complex blob morphs between different percentage values a simple keyframe animation suffices; CSS interpolates lengths directly.