Home › Developer Tools › CSS Border Radius Generator

CSS Border Radius Generator

Shape any box with border-radius: drag the handles or sliders for each corner, switch to the advanced 8-value syntax for elliptical corners and organic blobs, and copy the CSS. It all runs in your browser.

Last updated:

Mode
Unit
Presets

Drag the round handles on the shape (or focus one and use the arrow keys).

Corners

Generated CSS

        

Advertisement

How to use the CSS Border Radius Generator

  1. Choose a mode: Simple for one radius per corner, or Advanced for separate horizontal and vertical radii.
  2. Pick a unit (px or %) and drag the sliders, or drag the round handles on the shape itself.
  3. Try a preset like Pill or Drop, or press Random blob until you like the organic shape.
  4. Set the preview size to match your element, because percentages and large radii depend on it.
  5. Press Copy CSS and paste the border-radius rule into your stylesheet.

border-radius shorthand cheat sheet

You writeTop-leftTop-rightBottom-rightBottom-left
10px10px10px10px10px
10px 20px10px20px10px20px
10px 20px 30px10px20px30px20px
10px 20px 30px 40px10px20px30px40px
50% / 25%50% × 25%50% × 25%50% × 25%50% × 25%

The longhand properties are border-top-left-radius, border-top-right-radius, border-bottom-right-radius and border-bottom-left-radius. Each accepts one value (a circular corner) or two values separated by a space (horizontal, then vertical) for an elliptical corner. Note the order differs from the shorthand: in the longhand the two values are separated by a space, not a slash.

Worked example: how overlapping radii are scaled

Take a box 200px wide and 100px tall with border-radius: 80px. Along the 100px sides, the top and bottom radii add up to 160px, which is more than 100px. CSS computes a factor for every side (side length ÷ sum of its two radii) and applies the smallest one to all radii: 100 ÷ 160 = 0.625, so every corner is drawn at 80 × 0.625 = 50px. The result is a pill, exactly like border-radius: 50px. That is why very large values such as 9999px reliably produce pill shapes.

Popular shapes with border-radius

ShapeCSSNote
Circleborder-radius: 50%Element must be square
Ellipseborder-radius: 50%On a rectangle
Pill / capsuleborder-radius: 9999pxWorks at any width
Tabborder-radius: 12px 12px 0 0Rounded on top only
Leafborder-radius: 0 70%Two opposite corners
Drop / pinborder-radius: 50% 50% 50% 0Rotate 45° or -45° to point it
Eggborder-radius: 50% / 60% 60% 40% 40%Taller than wide works best
Blobborder-radius: 30% 70% 70% 30% / 30% 30% 70% 70%Animate between two blobs for a "morphing" effect

Tip: to animate a morphing blob, put two different 8-value radii in @keyframes and let border-radius transition between them. Pair it with a soft shadow from the box shadow generator, then tidy your stylesheet with the CSS Formatter.

Frequently asked questions

How does the border-radius shorthand work?

With one value all four corners match. Two values set top-left and bottom-right, then top-right and bottom-left. Three values set top-left, then top-right and bottom-left, then bottom-right. Four values go clockwise from top-left: top-left, top-right, bottom-right, bottom-left.

What does the slash in border-radius mean?

Values before the slash are horizontal radii and values after it are vertical radii, which makes each corner a quarter of an ellipse. For example border-radius: 50% / 30% gives every corner a 50% wide and 30% tall curve. This 8-value syntax is how CSS blob shapes are made.

Should I use px or % for border-radius?

Use px when you want the same visible rounding regardless of size, such as 8px on cards and buttons. Use % when the shape should scale with the element: 50% on a square makes a circle. Horizontal percentages are relative to the width and vertical ones to the height.

How do I make a perfect circle or pill?

For a circle use a square element (equal width and height) with border-radius: 50%. For a pill shape on an element of any width, use a pixel radius of at least half the height, often written as 9999px, so the ends stay fully round.

Why does my radius look smaller than the value I set?

When two adjacent radii add up to more than the length of that side, the browser scales all radii down by the same factor so the curves never overlap. The tool tells you when that happens.

How do I make a CSS blob shape?

Switch to Advanced mode with % units and give each corner different horizontal and vertical radii, keeping each pair along a side at 100% total for smooth curves, for example 30% 70% 70% 30% / 30% 30% 70% 70%. The Random blob button generates these for you.

Does border-radius clip the content inside?

It clips the element's background and border. Child elements and images can still poke out of the rounded corners; add overflow: hidden (or overflow: clip) to the element to clip its content too.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

CSS FormatterBeautify CSS with indent controls and optional property sorting.CSS MinifierMinify CSS with csso or a built-in engine and see the size saved instantly.HTML FormatterBeautify and indent HTML code with a live preview.HTML MinifierMinify HTML: strip comments and whitespace safely and see how many bytes you save.Open Graph PreviewPaste OG tags and preview how links look on Facebook, X and LinkedIn.YouTube Embed Code GeneratorCreate responsive YouTube embed code with start time, autoplay, loop and privacy mode.CSS Box Shadow GeneratorDesign layered CSS box shadows with a live preview, presets and one-click Copy CSS.CSS Button GeneratorDesign CSS buttons with gradients, borders, shadows and hover and active states, then copy the code.CSS Flexbox GeneratorBuild flexbox layouts visually: set container and item properties, then copy the CSS and HTML.Twitter Card GeneratorCreate X / Twitter Card meta tags with Open Graph fallbacks, character counters and a live preview.CSS Grid GeneratorDraw CSS grid layouts: set tracks and gaps, drag to name areas, then copy the CSS and HTML.PX to REM ConverterConvert px to rem or em and back, with a 1-100px table and a whole-CSS converter.Glassmorphism CSS GeneratorDesign frosted-glass UI cards with blur, transparency and border sliders, then copy the CSS.CSS Text Shadow GeneratorLayer CSS text shadows with a live preview and neon, 3D, outline and retro presets.HTML Editor (Live Preview)Write HTML, CSS and JavaScript and see a live, sandboxed preview as you type.HTML to JSX ConverterConvert HTML to valid React JSX: className, htmlFor, style objects, self-closing tags and events.CSS Clip-Path GeneratorDraw CSS clip-path shapes by dragging points: polygons, circle, ellipse and inset. Copy the CSS.CSS Animation GeneratorCreate CSS keyframe animations from 23 presets with live preview, timing controls and Copy CSS.CSS Triangle GeneratorMake CSS triangles in 8 directions with the border trick or clip-path. Set size and color, copy CSS.CSS Loader GeneratorPick from 14 pure CSS spinners and loaders, set color, size and speed, then copy the HTML and CSS.Cubic Bezier GeneratorDrag the control points to design a CSS easing curve, compare it with linear and copy cubic-bezier().CSS Filter GeneratorAdjust blur, brightness, contrast, hue, sepia and drop-shadow on an image and copy the CSS filter.CSS Specificity CalculatorCalculate CSS selector specificity (a, b, c), including :is(), :not(), :has() and :where(), and compare.Google Maps Embed GeneratorTurn an address or coordinates into responsive Google Maps iframe embed code, no API key.Neumorphism CSS GeneratorDesign soft UI neumorphic shapes with live preview and copy the box-shadow CSS.SVG Wave GeneratorMake layered SVG waves for section dividers and export SVG, PNG or a CSS background.SVG Blob GeneratorGenerate random organic SVG blob shapes with gradients and export SVG, PNG or CSS clip-path.CSS Clamp GeneratorTurn min/max sizes and viewport widths into a fluid CSS clamp() value in rem and vw.CSS @font-face GeneratorTurn font files or URLs into ready-to-paste @font-face rules with weights, styles and a preview.CSS Media Query GeneratorBuild @media rules for widths, orientation, dark mode and hover, or get framework breakpoints.CSS Scrollbar GeneratorStyle scrollbars: width, colors, radius and hover, with ::-webkit-scrollbar and scrollbar-color CSS.CSS Sprite GeneratorPack many icons into one sprite sheet PNG and get CSS classes with background-position.CSS Text Gradient GeneratorMake gradient text with background-clip:text: color stops, angle, font preview and fallback CSS.CSS Toggle Switch GeneratorDesign pure-CSS toggle switches: size, colors, shape and animation. Copy accessible HTML + CSS.CSS Tooltip GeneratorBuild pure CSS tooltips: position, arrow, colors, padding and animation. Copy HTML and CSS.HTML Form BuilderDrag and drop form fields with labels and validation, then copy accessible HTML and CSS code.Iframe GeneratorCreate iframe embed code: size or responsive ratio, border, allow, sandbox, lazy load, live preview.PX to VW ConverterConvert pixels to vw and vh for any viewport size, and vw/vh back to px, with breakpoint tables.CSS Color Filter GeneratorTurn a HEX color into a CSS filter that recolors black icons and SVGs, with an accuracy score.CSS Gradient Animation GeneratorCreate animated gradient backgrounds: pick colors, angle and speed, preview live and copy the CSS.CSS Hover Effects GeneratorPick button, link and image hover effects, tweak colors and timing, and copy the HTML and CSS.CSS InlinerMove CSS from style blocks into inline style attributes so HTML emails render in every client.CSS Shape Divider GeneratorCreate wave, tilt, curve and triangle section dividers and copy the SVG, HTML and CSS.CSS Transform GeneratorRotate, scale, skew and translate an element with sliders and copy the CSS transform code.Font Pairing ToolPreview Google Font heading and body pairs on real layouts and copy the embed code and CSS.HTML Accessibility CheckerPaste HTML to find WCAG accessibility problems with impact level, the failing element and a fix.HTML Image Map GeneratorDraw clickable rectangle, circle and polygon hotspots on an image and get image map HTML.SVG ViewerOpen or paste SVG code to preview it live with zoom, backgrounds, size info and PNG export.Pathfinding VisualizerAnimate BFS, DFS, Dijkstra, A* and greedy search on a grid with walls, weights and mazes.SVG Path EditorEdit an SVG path d attribute visually: drag points, edit commands, convert, scale and minify.SVG to CSS Data URITurn SVG code into a small URL-encoded data URI for CSS backgrounds, with Base64 size comparison.SVG to JSXTurn SVG code into a clean React component: camelCase attributes, style objects, TypeScript.Tailwind CSS Cheat SheetSearchable Tailwind class to CSS reference with live previews, class decoder and color palette.Web App Manifest GeneratorCreate a PWA manifest.json and every app icon size from one image, downloaded as a ZIP.CSS Background Pattern GeneratorMake pure-CSS stripes, dots, checkerboard, zigzag and grid backgrounds and copy the code.
See all 52 Web, HTML & CSS Tools →