Skip to main content

    CSS Border Radius Generator

    Generate CSS border-radius visually. Adjust each corner independently or link them together.

    No signup. 100% private. Processed in your browser.

    Drag the sliders to set border-radius values and copy the generated CSS.

    border-radius: 16px;

    How CSS Border Radius Actually Works

    The border-radius property doesn't just round corners — it defines elliptical curves. Each corner gets two radii: horizontal and vertical. When they're equal, you get a perfect circular arc. When they differ, you get an elliptical curve that can create organic, blob-like shapes.

    Think of each corner as a quarter of an ellipse tucked into the box. The horizontal radius controls how far the curve extends along the top/bottom edge, while the vertical radius controls how far it extends along the side edge. That's why border-radius: 50% turns a square into a circle — each corner's curve meets the next, creating a continuous ellipse.

    This generator lets you set all eight values independently (4 corners × 2 radii), giving you full control over shapes that would be nearly impossible to eyeball in code.

    Common Border Radius Patterns

    PatternCSS ValueUse Case
    Subtle rounding4px or 0.25remInput fields, table cells, small cards
    Standard card8px or 0.5remCards, modals, dropdowns
    Soft card12-16px or 0.75-1remModern SaaS cards, app-style UI
    Pill / chip9999px or fullTags, badges, pill buttons
    Circle50% (on a square)Avatars, status dots, round buttons
    Top-only12px 12px 0 0Card headers, tab bars, sheet handles
    Organic blob30% 70% 70% 30% / 30% 30% 70% 70%Decorative shapes, backgrounds, avatars

    What this means for you: Most UI elements only need the first three patterns. Save the complex elliptical values for decorative elements where a unique shape adds personality.

    The Shorthand Syntax

    CSS border-radius shorthand follows the same clockwise pattern as margin and padding — top-left, top-right, bottom-right, bottom-left. The slash separates horizontal radii from vertical radii:

    One Value

    border-radius: 8px — all four corners, circular arc.

    Two Values

    border-radius: 8px 0 — top-left/bottom-right get 8px, top-right/bottom-left get 0.

    Four Values

    border-radius: 8px 4px 12px 0 — each corner set individually, clockwise from top-left.

    Elliptical (slash syntax)

    border-radius: 50% / 30% — horizontal radii before the slash, vertical radii after. This is how you make organic shapes.

    Tailwind CSS Border Radius Classes

    ClassCSS ValuePixels (default config)
    rounded-sm0.125rem2px
    rounded0.25rem4px
    rounded-md0.375rem6px
    rounded-lg0.5rem8px
    rounded-xl0.75rem12px
    rounded-2xl1rem16px
    rounded-3xl1.5rem24px
    rounded-full9999pxPill / circle

    What this means for you: If your project uses Tailwind, grab the pixel value from this generator and pick the closest utility class. For custom values, use arbitrary syntax likerounded-[14px].

    Related Tools

    How to use this tool

    1

    Drag the slider to set your border-radius value (or unlink corners for individual control)

    2

    Preview the shape live on the blue box above

    3

    Click Copy CSS to grab the generated code

    Common uses

    • Creating rounded card designs for modern UI layouts
    • Building circular avatar components with 50% radius
    • Generating pill-shaped buttons and tag elements
    • Previewing organic blob shapes with asymmetric radii

    Share this tool

    Frequently Asked Questions