Border Radius Generator
A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call
Free CSS border radius generator. Round each corner with sliders in px, % or rem, see a live preview and copy the shortest border-radius code.
Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.
How to use the border radius generator
- Choose a unit: px for fixed rounding, % for rounding relative to the element's size, or rem to scale with the font size.
- Drag the sliders for each corner: top left, top right, bottom right and bottom left. With "Same for all corners" ticked, moving one moves all four.
- Or start from a shape: card, pill, circle, leaf or ticket.
- Copy the CSS.
The border radius generator shows a live preview and writes the shortest valid border-radius declaration for your corners, ready to paste into your stylesheet.
What border-radius does
The CSS border-radius property rounds the corners of an element's box. It affects the background, the border, box shadows and the outline of the element, and it clips images inside when combined with overflow: hidden.
.card { border-radius: 12px; }
The shorthand, explained
border-radius takes one to four values, in the order top left, top right, bottom right, bottom left (clockwise from the top left):
- One value: all four corners.
border-radius: 12px; - Two values: top-left and bottom-right, then top-right and bottom-left.
border-radius: 12px 0; - Three values: top-left, then top-right and bottom-left, then bottom-right.
border-radius: 8px 16px 24px; - Four values: each corner in turn.
border-radius: 0 24px 0 24px;
The border radius generator always writes the shortest form that gives the same result, so equal corners become one value.
px, % and rem
- px gives the same rounding whatever the element's size. Good for cards, buttons and inputs.
- % is relative to the element's width (horizontally) and height (vertically). 50% on a square makes a circle; on a rectangle, an ellipse. Values above 50% don't round any further.
- rem scales with the root font size, so rounding grows if a user enlarges text. To convert px to rem, use the px to rem converter.
Common shapes
- Subtle card: 8 to 16 px. The modern default for cards, panels and images.
- Button: 4 to 8 px for a crisp look, or fully rounded for a pill.
- Pill: a very large value like 999px (or 9999px) on a short, wide element. The browser caps the radius at half the height, so the ends become perfect semicircles at any size.
- Circle: 50% on a square element, such as an avatar.
- Leaf: two opposite corners rounded, two sharp:
0 60px 0 60px. - Ticket or speech-bubble styles: mixed sizes on each corner.
Rounded images and avatars
.avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
object-fit: cover stops the photo from being squashed when it isn't square. To turn a photo into a round image file instead, use the circle crop image tool.
Nested rounded corners
When a rounded element sits inside another with padding, the inner radius should be smaller than the outer one, or the gap looks uneven:
Inner radius = outer radius − padding
A card with a 24 px radius and 8 px padding should have images or inner panels with a 16 px radius.
Design consistency
Pick two or three radius sizes and use them everywhere: for example, 4 px for small controls, 12 px for cards and fully rounded for pills and avatars. Store them as CSS custom properties:
:root { --radius-sm: 4px; --radius-md: 12px; --radius-full: 999px; }
Consistent rounding is one of the quiet things that makes an interface look designed. Rounded corners also pair naturally with soft shadows; the box shadow generator creates those.
Elliptical corners
Each corner can have a horizontal and a vertical radius, written with a slash: border-radius: 50% / 20%;. This creates elliptical corners for organic or blob shapes. The border radius generator focuses on the circular corners used in almost every interface; you can add a slash value by hand if you need it.
Browser support
border-radius works in every modern browser without prefixes. You don't need -webkit-border-radius any more.
Tips
- Clip children: add
overflow: hiddenif images or backgrounds poke out of the corners. - Watch borders: thick borders on rounded corners look best with a radius at least as big as the border width.
- Test on dark and light backgrounds, where rounding can look different.
- Keep buttons and inputs matching so forms look tidy.
Privacy and accuracy
Everything happens in your browser. The border radius generator writes standard CSS that matches the preview exactly, with no AI involved and nothing uploaded. Web designers, developers and students use it free on any device.
Border radius and accessibility
Rounded corners are a style choice, but they also affect usability:
- Focus outlines follow border-radius in modern browsers, so keyboard users see a rounded focus ring that matches the button. Make sure it's visible.
- Very large radii on small text inputs can cut into the text area. Leave enough padding.
- Consistency helps people scan: if all buttons share one radius and all cards another, the interface is easier to understand.
Border radius on tables and images
Tables ignore border-radius unless you set border-collapse to separate, or wrap the table in a container with the radius and overflow: hidden. Images take border-radius directly; for a soft photo frame, combine the radius from the border radius generator with a small shadow from the box shadow generator.
Animating border radius
border-radius can be animated with CSS transitions, for example rounding a square button into a circle on hover:
.btn { border-radius: 8px; transition: border-radius 0.2s ease; }
.btn:hover { border-radius: 24px; }
Keep animations short and subtle, and respect users who prefer reduced motion.
Using the border radius generator with design tools
Design tools such as Figma use the same corner values in pixels, so you can copy a radius from a design file into the border radius generator to check it, or the other way round. Many design systems publish their radius scale (for example 2, 4, 8, 12, 16 and full), which makes it easy to keep code and designs in step.
Quick reference
- border-radius: rounds all four corners.
- border-top-left-radius (and the other three): round one corner.
- 50%: a circle on a square element.
- 999px: a pill on any short element.
- Slash syntax: separate horizontal and vertical radii for elliptical corners.
A simple radius scale
| Token | Value | Use |
|---|---|---|
| radius-sm | 4px | Inputs, small buttons, tags |
| radius-md | 8px | Buttons, dropdowns |
| radius-lg | 12–16px | Cards, panels, images |
| radius-xl | 24px | Large feature cards, modals |
| radius-full | 999px | Pills, avatars, toggles |
Pick values with the border radius generator, then save them as CSS variables so the whole site stays consistent.
Choosing a style for your brand
Corner shapes carry personality. Sharp corners (0 to 2 px) feel precise, serious and traditional, which suits law firms, finance and luxury brands. Medium rounding (6 to 12 px) feels modern and approachable, and is the most common choice for apps and websites. Large rounding and pills feel friendly, playful and soft, which suits consumer apps, children's products and wellness brands. Whatever you choose, apply it consistently: mixing sharp and very round corners at random makes a design look unfinished. Experiment in the border radius generator, then pick your scale and stick to it.
Border radius and images in email
Many email clients support border-radius on images and buttons, but some older ones ignore it and show square corners. Design emails so they still look fine with square corners, and treat rounding as a nice extra. For a reliably round image in an email, use a pre-cropped round PNG from the circle crop image tool instead of relying on CSS from the border radius generator.
A worked example
A designer is building a pricing page. She wants cards with gently rounded corners, so she picks "Card (12px)" in the border radius generator, and copies border-radius: 12px;.
For a "Most popular" badge, she switches to the pill preset: border-radius: 999px;. For the feature images inside the cards, which sit 8 px in from the edge, she sets 4 px (12 − 8) so the curves line up.
Finally, for a playful testimonial bubble, she unticks "Same for all corners" and sets 24, 24, 24 and 4 px. The generator writes border-radius: 24px 24px 24px 4px;, a speech bubble with one sharp corner pointing to the customer's photo.
Need more customers from Google?
This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. DeepRit is a Google Ads agency that does PPC and nothing else: we build the campaigns, block the searches that waste money, write the ads, set up conversion tracking and send you a short report every week. Request a free PPC audit and we will show you, in dollars, what we would fix first.
Frequently asked questions
How do I make rounded corners in CSS?
Use border-radius, such as border-radius: 12px;. The border radius generator writes it with a live preview.
How do I make a circle with CSS?
Give a square element border-radius: 50%;.
How do I make a pill-shaped button?
Use a very large radius like border-radius: 999px;; the browser caps it at half the height.
What order are the four values in?
Top left, top right, bottom right, bottom left: clockwise from the top left.
Do I need vendor prefixes for border-radius?
No. All modern browsers support it without prefixes.
Is the border radius generator free?
Yes, completely free, with no sign-up.
Free PPC audit
See where your ad budget leaks.
We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.