Getting the right border-radius values requires understanding both the shorthand and the individual corner properties, plus the less obvious elliptical syntax that lets you create asymmetric curves.
Loading Border Builder…
Set all four corners independently or symmetrically
Supports pixel values, percentage values, and elliptical slash notation
Live preview updates on every input change
Generates concise shorthand output automatically
Drop the Border Builder into any page — blog post, product docs, intranet, school portal — with a single line of HTML. Your visitors get the full tool, processed entirely in their browser. No backend, no uploads, no signup.
Embed code
<iframe
src="https://www.fixtools.io/css-tool/border-builder?embed=1"
width="100%"
height="780"
frameborder="0"
style="border:0;border-radius:16px;max-width:900px;"
title="Border Builder by FixTools"
loading="lazy"
allow="clipboard-write"
></iframe>Attribution-friendly: a small "Powered by FixTools" link appears in the embed footer.
The border-radius shorthand sets all four corners at once. One value applies the same radius to every corner. Two values set top-left and bottom-right with the first value, and top-right and bottom-left with the second. Three values set top-left, then top-right and bottom-left together, then bottom-right. Four values set top-left, top-right, bottom-right, and bottom-left in clockwise order. The individual properties are border-top-left-radius, border-top-right-radius, border-bottom-right-radius, and border-bottom-left-radius. These are useful when you need to override a single corner after setting the shorthand, such as giving only the top-left and top-right corners a radius for a card header.
Percentage values make border-radius responsive. A value of 50% on a square element produces a perfect circle, because 50% of each side meets at the center. On a non-square element, 50% produces an ellipse rather than a circle. This is the standard technique for circular avatar images: set width and height to the same pixel value and apply border-radius: 50%. For pill-shaped buttons, a very large pixel value like 9999px is more reliable than 50% because it always produces a full semicircle on the short sides regardless of the element's aspect ratio.
Elliptical border-radius uses a slash to separate horizontal and vertical radii. The syntax is border-radius: horizontal / vertical, for example border-radius: 40px / 20px. This produces corners where the horizontal curve is wider than the vertical curve, creating an egg-like shape. You can also apply the elliptical syntax per corner: border-top-left-radius: 40px 20px sets a 40px horizontal and 20px vertical radius on just that corner. This level of control is useful for organic shapes, leaf-like elements, or decorative section dividers that need irregular curves.
Border-radius and clip-path overlap in capability but solve different problems, and choosing the right one affects both appearance and interaction. Border-radius rounds the four corners of the element's box and applies cleanly to backgrounds, borders, and box-shadow without extra work. Clip-path can produce any polygon, circle, or path shape including asymmetric and non-rectangular forms that border-radius cannot reach (octagons, arrows, speech bubbles, hexagons). The tradeoff is that clip-path does not produce a border: the clipped edge has no outline, and box-shadow on a clipped element is also clipped, which usually means no shadow at all. Clipped elements also cannot have a visible focus ring drawn by outline. For standard rounded corners with borders and shadows, border-radius is the right tool. Reach for clip-path only when you genuinely need a non-rectangular shape and can accept losing the standard border and shadow behaviour.
Enter a value in pixels to round all four corners equally, or unlock individual corners to set different radii per corner. Switch to percentage mode for responsive elements. Use the slash notation for elliptical curves where horizontal and vertical radii differ.
Step-by-step guide to css border radius generator:
Enter a base radius value
Type a pixel or percentage value in the all-corners input to apply the same radius to all four corners. This is the starting point for most use cases.
Unlock individual corners if needed
Toggle per-corner mode to set different values for each corner. Enter values for top-left, top-right, bottom-right, and bottom-left independently.
Switch to elliptical mode for asymmetric curves
Enable the slash notation to set separate horizontal and vertical radii per corner. This is for advanced organic shapes rather than standard rounded corners.
Copy the output CSS
Click Copy CSS to get the generated border-radius declaration. The tool outputs the most concise shorthand that represents your corner values accurately.
Common situations where this approach makes a real difference:
Circular avatar images
Profile pictures and avatars use border-radius: 50% on a square container with overflow: hidden. The container must have equal width and height set explicitly; percentage radius on a non-square element produces an ellipse. A typical implementation sets the img to width: 100% height: 100% object-fit: cover inside a fixed-size div with border-radius: 50% and overflow: hidden.
Pill-shaped badges and tags
Badge and tag components use border-radius: 9999px to achieve fully rounded ends. This value is large enough that the radius is always capped at half the element's height, producing consistent semicircular ends regardless of the badge text length. Percentage values would produce ellipses on wider badges, so the large pixel value is the reliable approach.
Card components with rounded tops only
Cards that attach to a grid or sit flush with other elements often need rounded tops but flat bottoms. Border-radius: 8px 8px 0 0 achieves this. The shorthand two-value or four-value forms are both correct; four values make the intent clearest: border-radius: 8px 8px 0 0 explicitly zeros out the bottom corners rather than relying on shorthand inference.
Decorative blob backgrounds for landing pages
Blob shapes using the elliptical syntax add visual interest to marketing sections. A starting point is border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%. Each of the eight values controls one axis of one corner. Animating these values with a CSS keyframe animation or JavaScript produces the fluid blob animations popular in modern landing pages.
Get better results with these expert suggestions:
Use asymmetric shorthand to shape card tops
Border-radius: 8px 8px 0 0 rounds only the top-left and top-right corners, which is the standard treatment for card headers that sit above a flat card body. This avoids repeating individual corner properties and keeps the CSS declaration compact and readable.
Elliptical radii create organic decorative shapes
The slash syntax border-radius: 50% 50% 50% 50% / 60% 60% 40% 40% produces a blob-like shape useful for decorative section backgrounds. Each value pair before and after the slash controls the horizontal and vertical radii independently per corner, giving you full control over organic curves.
Border-radius respects the box model
Border-radius clips the visible border, background, and box-shadow of an element at the corners. However, it does not clip child elements unless you add overflow: hidden. This distinction matters when a child element has its own background or border that should follow the parent's rounded shape.
Transition border-radius for interactive morphing effects
Adding transition: border-radius 0.3s ease to an element and changing the value on :hover creates a morphing effect. For example, a square button can animate into a circle on hover: { border-radius: 4px } to :hover { border-radius: 50% }. This works well for icon buttons and toggle elements.
Use 9999px for pill shapes instead of 50%
Setting border-radius: 9999px always produces a pill shape regardless of element dimensions. With 50%, a rectangle becomes an ellipse rather than a pill. Use 9999px on buttons and badges for a consistent rounded-end appearance that does not depend on aspect ratio.
Combine with overflow: hidden for image clipping
Border-radius on a container clips its content only when combined with overflow: hidden. Without it, child images and elements with backgrounds bleed outside the rounded corners. Always set overflow: hidden on bordered containers that hold images or backgrounds.
Use percentage for circles on square elements
Border-radius: 50% on any element with equal width and height produces a perfect circle. This is the standard way to create round avatar images. For the circle to work, the element must have explicitly set equal dimensions.
More use-case guides for the same tool:
Other tools you might find useful:
Open the full Border Builder — free, no account needed, works on any device.
Open Border Builder →Free · No account needed · Works on any device