Border Radius Generator

Generate CSS border-radius values with visual preview. Free, fast, and works entirely in your browser with no sign-up required.

Updated

Share:
Home/Utility Tools/Border Radius Generator

Border Radius Generator

Create pixel-perfect CSS border-radius values with individual corner control, visual preview, shape presets, animation modes, gradient fill, SVG export, and multi-format code output.

Live Preview

180×130
100%
Quick copy:border-radius: 16px;

Corner Controls

16px

Shape Gallery

28 presets

Standard Shapes

Organic & Blob Shapes (8-Value)

Generated Code

border-radius property
.element {
  border-radius: 16px;
}

About Border Radius Generator

  • Visual corner diagram — click to select and focus individual corners
  • Individual corner control (TL/TR/BR/BL) or linked mode
  • 8-value asymmetric syntax with H/V per corner
  • Units: px, %, em, rem with smart max values
  • Element scale slider for proportional previewing
  • Solid, linear gradient, and radial gradient fill types
  • 5 background patterns: solid, checkerboard, dots, lines, gradient
  • 28 shape presets: circle, pill, leaf, blob, squircle, organic, shield, egg…
  • 3 animation modes: Morph, Pulse, Bounce
  • Dark/light preview with responsive sizes (mobile/tablet/desktop)
  • History with visual thumbnails and one-click restore (last 20)
  • Export as SVG clip-path with gradient fill support
  • CSS, Tailwind, styled-components, and CSS custom properties output

Privacy First: All processing happens locally in your browser. No data is sent to any server.

Frequently Asked Questions

What is the difference between using px and % for border-radius?

A pixel radius is fixed: border-radius: 16px rounds every corner by exactly 16 pixels no matter how big the element is. A percentage radius is relative — it is measured against the element's own width and height, so the corners scale as the box grows or shrinks. That difference matters for shape. A percentage near 50% bends the corners so far they meet, turning a square into a circle or a rectangle into an ellipse, which is why avatars and round buttons use 50% rather than a fixed pixel value. Pixels keep a consistent, predictable softness across different-sized cards and inputs; percentages create fluid shapes that adapt. This generator lets you switch units per design (px up to 200, % up to 50) and shows the live result, so you can see exactly which behavior you want before copying.

How do I make a perfect circle or a pill shape with border-radius?

For a circle, give an equal-sided (square) element border-radius: 50%. The percentage rounds each corner relative to the box, and at 50% the four arcs meet to form a full circle — this is the standard technique for round avatars and icon buttons. For a pill, the trick is different: apply a very large pixel value such as 9999px to an element that is wider than it is tall. The radius is capped at half the shorter side, so both ends become fully rounded semicircles while the straight middle stays flat, giving the classic tag or toggle look. Keeping the element square instead produces a circle again. This tool includes ready-made Circle and Pill presets, plus a live preview, so you can confirm the shape holds at your real element size before pasting the code.

What is the 8-value border-radius syntax and how does it make blob shapes?

Standard border-radius gives each corner one rounding value. The eight-value form splits each corner into a horizontal radius and a vertical radius, separated by a slash: the values before the slash set the horizontal radii and those after set the vertical ones. When a corner's horizontal and vertical radii differ, the arc becomes an asymmetric, egg-like curve rather than a clean quarter-circle. Combine four mismatched corners and the outline turns soft and irregular — the organic "blob," squircle, or pebble shapes popular in modern UI backgrounds and decorative elements. These are almost impossible to dial in by hand because eight numbers interact at once. This generator exposes all eight values, ships organic presets like squircle, pebble, and wave built on this syntax, and renders the result live so you can nudge a single radius and watch the silhouette change instantly.

How does the tool convert border-radius into Tailwind CSS classes?

When all four corners share the same pixel value, the generator checks whether that value matches Tailwind's default radius scale. If it lines up, you get the built-in utility — for example a small radius maps to rounded-md, and a very large value maps to rounded-full for circles and pills. When the value does not match a preset step, the tool falls back to Tailwind's arbitrary-value syntax, producing a class like rounded-[18px] that bakes the exact number in. Mixed corners are handled the same way, mapped to the appropriate per-corner utilities or arbitrary values. This saves you from memorizing the scale or guessing which named class equals which pixel amount. Alongside Tailwind, you can copy plain CSS shorthand, a styled-components template, or CSS custom properties — pick the format your project uses and paste it straight in.

Why do em and rem give a larger radius than the same number in pixels?

em and rem are font-relative units, not absolute ones. One rem equals the root font size, and one em equals the current element's font size; in a typical setup both resolve to 16 pixels. So border-radius: 1rem is roughly a 16px radius, and 2rem is about 32px — much rounder than border-radius: 2px. The advantage is scalability: if a user or your design system bumps the base font size, radii built in em or rem grow proportionally and stay visually balanced with the text, while pixel radii stay frozen. Use rem when you want corners that track your typographic scale across a whole theme, and em when you want them tied to a single component's font size. This generator computes em and rem against a 16px base in the preview so the rounding you see matches what ships, and you can switch units anytime to compare.

Embed This Tool

Add a free, live version of this widget to your own website or blog post — it runs entirely in your visitors' browsers, with a credit link back to The Toolbox.

Copy & paste this HTML
<iframe src="https://getthetoolbox.com/embed/border-radius-generator" title="Border Radius Generator — The Toolbox" width="100%" height="320" style="max-width:480px;border:1px solid #e2e8f0;border-radius:12px" loading="lazy"></iframe>
<p style="font-size:12px;margin:4px 0 0"><a href="https://getthetoolbox.com/utility-tools/border-radius-generator?utm_source=embed&utm_medium=widget" target="_blank" rel="noopener">Free Border Radius Generator</a> by The Toolbox</p>

About the Border Radius Generator

The Border Radius Generator is a free visual tool for building CSS border-radius values and copying production-ready code. Instead of guessing pixel values and reloading your stylesheet, you drag sliders, watch a live preview round its corners in real time, and paste the result straight into your project. It is built for front-end developers, UI designers, and anyone styling buttons, cards, avatars, badges, or modals who wants the corners to look exactly right before committing to a number.

Everything runs locally in your browser. Nothing you create is uploaded, there is no sign-up, and no software to install — the generator works the moment the page loads and keeps working offline afterward.

What you can control

border-radius is shorthand that accepts up to eight values, and this generator exposes all of them:

  • Four corners, linked or individual — adjust all corners together, or unlink them to set the top-left, top-right, bottom-right, and bottom-left separately. A visual corner diagram lets you click a corner to focus it.
  • Four units — px (up to 200), % (up to 50, for fluid shapes that scale with the element), em, and rem (up to 10 each). Percentages are what turn a square into an ellipse or circle.
  • 8-value asymmetric mode — give each corner an independent horizontal and vertical radius using the horizontal / vertical slash syntax. This is how organic "blob" shapes are made.

You can also recolor the preview box with a solid fill or a linear/radial gradient, scale the element from 30% to 200%, switch between mobile, tablet, and desktop preview sizes, and toggle a dark background — useful because a radius that reads as crisp on white can look heavier on dark.

Presets and code output

A shape gallery offers ready-made starting points: standard rounding from XS through 3XL, plus circle, pill, leaf, ticket, tab, chat-bubble, shield, and egg shapes, and a set of eight organic presets (squircle, pebble, wave, amoeba, flower, and more) built on the 8-value syntax. A "Random" button shuffles values to spark ideas, and a history panel keeps your last 20 saved states as clickable thumbnails so you can compare and restore them.

When a shape looks right, copy it in the format your stack uses:

  • CSS — a clean border-radius rule, collapsed to its shortest form (a single value when all corners match).
  • Tailwind CSS — mapped to built-in classes like rounded-md or rounded-full where the value lines up with the default scale, or arbitrary values like rounded-[16px] otherwise.
  • styled-components / Emotion — a ready template literal.
  • CSS custom properties — per-corner variables you can override at the theme or component level.

You can also export the exact shape as an SVG clip-path, gradient fill included, for use as a mask or graphic asset.

Why border-radius matters

Corner rounding is one of the most visible signals of a polished interface. Sharp 0px corners read as technical or formal; a small 4–8px radius softens cards and inputs without drawing attention; larger values feel friendly and modern. Consistency is the real win — defining a radius scale (for example 4, 8, 16px) and reusing it keeps a product feeling coherent.

A few values are worth committing to memory: border-radius: 50% turns an equal-sided square into a perfect circle, which is the standard way to make round avatars. A very large pixel value such as 9999px on a wider-than-tall element produces a pill shape with fully rounded ends, common on tags and toggle buttons. And because the property animates smoothly, you can transition corners on hover — the Border Radius Generator includes Morph, Pulse, and Bounce preview modes so you can see that motion before writing the keyframes.