Hero Background

Next-Gen App & Browser Testing Cloud

Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

Next-Gen App & Browser Testing Cloud

Border Radius Generator

This free tool allows you to generate CSS border-radius code with a live preview. Adjust corners, pick presets, and copy vendor-prefixed CSS for your project.

Options

Live Preview

Vendor prefixes

Drag corner handles on the preview or use the controls below.

Generated CSS

The CSS Border Radius Generator lets you round element corners visually and copy the border-radius code without guessing pixel values in your editor. Drag the corner handles on the preview, use the slider, or set each corner on its own. Pick a preset like Max or Rounded and watch the preview update before you copy. It is built for front-end developers and designers who want consistent rounded corners on buttons, cards, avatars, and inputs. Everything runs in your browser, so there is nothing to install and nothing to upload.

What is the Border Radius Generator?

border-radius rounds the corners of an element's border box. It is one of the most common properties in modern UI design because a small radius on a card or button makes the interface feel finished without adding layout complexity.

The Border Radius Generator is a free online tool that produces CSS for that property. You control all four corners from one slider when they are linked, or set top-left, top-right, bottom-right, and bottom-left independently when they are not. The tool also outputs optional -webkit-border-radius and -moz-border-radius lines for older browser targets, plus the standard unprefixed border-radius declaration.

How to use the Border Radius Generator?

You can get copy-ready CSS in under a minute. Follow these steps:

  • Pick a preset: Click Sharp, Subtle, Rounded, Large, or Max to load a starting radius. Max uses a large px value so short elements read as capsules.
  • Adjust the corners: Drag the handles on the preview, use the All corners slider when linked, or check Edit corners separately to type a value for each corner.
  • Preview the result: Change the preview background color if you need more contrast. The white box updates as you move the controls.
  • Choose vendor prefixes: Leave WebKit, Gecko, and CSS3 checked for legacy support, or turn prefixes off if you only need standard border-radius.
  • Copy or download: Copy the generated CSS from the output area, or download it as a .css file and paste into your stylesheet.

border-radius syntax explained

The property accepts one to four length values. The generator writes the shortest form that matches your corners.

  • One value: All four corners share the same radius. Example: border-radius: 10px;
  • Four values: Each corner is set in clockwise order starting at top-left: top-left, top-right, bottom-right, bottom-left. Example: border-radius: 10px 20px 10px 20px;

This tool outputs values in px. For a perfect circle on a square element, you typically set border-radius: 50% in CSS so the radius scales with the element size. The Max preset here uses a large px value instead, which works well for buttons and tags with a fixed height.

Common rounded corner styles

These are the shapes most teams reach for. The preset names in the tool map to the first column.

StyleTypical CSSBest for
Sharpborder-radius: 0;Tables, strict grids, full-bleed media
Subtleborder-radius: 8px;Inputs, small buttons, chips
Roundedborder-radius: 16px;Cards, modals, panels
Largeborder-radius: 24px;Hero cards, featured tiles
Maxborder-radius: 9999px;Tags, pill buttons, badges

Use cases of border-radius

Rounded corners show up everywhere in product UI. These are the jobs the property handles best:

  • Buttons and chips: A pill radius on a fixed-height button keeps the ends fully rounded without measuring the width.
  • Cards and panels: 8px to 16px radius separates content blocks from the page background while staying subtle.
  • Avatars and thumbnails: Pair a square image with border-radius: 50% in your CSS for circular profile photos. Use this tool to dial in the px radius when the container is not square.
  • Form fields: Light rounding on inputs and textareas matches the radius on adjacent buttons.

For depth on rounded surfaces, combine your radius with the Box Shadow Generator. box-shadow follows border-radius, so a rounded card casts a rounded shadow. For soft UI surfaces, try the Neumorphism Generator after you set the corner radius.

This tool is maintained by TestMu AI (formerly LambdaTest), the team behind a unified testing platform, so it is built with consistent cross-browser rendering in mind.

border-radius and vendor prefixes

Modern browsers use the standard border-radius property without a prefix. Older WebKit and Gecko builds expected -webkit-border-radius and -moz-border-radius.

The prefix checkboxes let you include those lines when you need to support legacy environments. For new projects, the unprefixed border-radius line alone is usually enough. Turn prefixes off in the tool to keep the output short.

Frequently Asked Questions (FAQs)

What is CSS border-radius?

border-radius rounds the corners of an element. You set a length for each corner, and the browser clips the border and background to that curve.

How do I round only one corner?

Uncheck the linked mode, then set top-left, top-right, bottom-right, and bottom-left independently. The generator outputs a four-value declaration in clockwise order.

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

Px gives a fixed corner size regardless of the element's dimensions. Percentages are relative to the element's width and height, so 50% on a square makes a circle. This generator works in px; use 50% directly in your CSS when you need a circle on a square box.

How do I make a pill button?

Use a radius much larger than half the element height. The Max preset sets 9999px, which caps the curve at the element's half-height so the ends form semicircles. That is the usual approach for capsule buttons and tags.

Do I still need -webkit-border-radius?

Not for current Chrome, Firefox, Safari, or Edge. Keep the prefixed lines only if you must support very old browsers. The tool lets you toggle each prefix on or off.

Does border-radius work with box-shadow?

Yes. box-shadow follows the same rounded outline as the element. Rounded cards with shadows look most natural when both properties use matching corner sizes.

Is the border radius generator free?

Yes. It is free with no signup and no usage limit. The tool runs entirely in your browser.

Did you find this page helpful?

ShadowLT Logo

Start your journey with TestMu AI

Get 100 minutes of automation test minutes FREE!!