Skip to main content

Border Radius Generator

Generate CSS border-radius code with visual preview for rounded corners and organic shapes. Enter values for instant results with step-by-step formulas.

Skip to calculator
Creative & Design

Border Radius Generator

Generate CSS border-radius code with visual preview for rounded corners and organic shapes.

Last updated: December 2025

Calculator

Adjust values & calculate
All corners change together
Live Preview
Generated CSS
border-radius: 16px;
Shape
Rounded
Avg Radius
16.0px
Max Radius
16px
Your Result
CSS: border-radius: 16px; | Shape: Rounded Rectangle
Share Your Result
Understand the Math

Formula

border-radius: TL TR BR BL

The border-radius shorthand accepts one to four values in clockwise order: top-left, top-right, bottom-right, bottom-left. When fewer values are given, they follow the same pairing rules as margin and padding.

Last reviewed: December 2025

Worked Examples

Example 1: Rounded Card Component

You need a card with 12px rounded corners on all sides for a dashboard UI component.
Solution:
Set all four corner values to 12px. border-radius: 12px; This applies a uniform 12px circular arc to each corner. The shorthand uses a single value since all corners are identical. Result: A clean, modern card with consistent rounding.
Result: CSS: border-radius: 12px; โ€” uniform rounded corners for a polished card look.

Example 2: Organic Blob Shape

Create an organic-looking shape for a decorative background element using asymmetric border-radius values.
Solution:
Use different values for each corner to break symmetry. Top-left: 30px, Top-right: 70px, Bottom-right: 70px, Bottom-left: 30px border-radius: 30px 70px 70px 30px; Diagonal corners share values for a balanced but organic feel. The shape looks natural while maintaining visual harmony.
Result: CSS: border-radius: 30px 70px 70px 30px; โ€” an organic blob perfect for decorative elements.
Expert Insights

Background & Theory

The Border Radius Generator applies the following established principles and formulas. Computers represent all information using binary, a base-2 number system consisting solely of the digits 0 and 1, each called a bit. Because long binary strings are unwieldy, programmers routinely use octal (base 8) and hexadecimal (base 16) as compact shorthand. Converting between bases follows a consistent algorithm: divide the source number repeatedly by the target base, collecting remainders in reverse order. Hexadecimal digits A through F represent the values 10 through 15, allowing a single character to encode four binary bits, making it the preferred notation for memory addresses, color codes, and bytecode. Bitwise operations manipulate individual bits within integers. AND produces a 1 only when both input bits are 1, making it useful for masking. OR produces a 1 when either bit is 1 and is used for combining flags. XOR flips bits that differ, enabling simple toggle logic and efficient swap algorithms. NOT inverts every bit (one's complement), while left and right shifts multiply or divide by powers of two in constant time. Data storage units ascend in binary multiples of 1024: 8 bits form one byte, 1024 bytes form one kibibyte (KiB), 1024 KiB form one mebibyte (MiB), and so forth. Hard-drive manufacturers historically use decimal prefixes (1 KB = 1000 bytes), creating the persistent confusion between binary and decimal interpretations of the same label. The IEC standardized the binary prefixes KiB, MiB, GiB, and TiB in 1998 to resolve this ambiguity. Network bandwidth is measured in bits per second (bps), most commonly megabits per second (Mbps) or gigabits per second (Gbps). A 100 Mbps connection transfers 100 million bits every second, equating to roughly 12.5 megabytes per second. IP subnet masks define network boundaries; CIDR notation appends a prefix length (e.g., /24) to an address, indicating how many leading bits are fixed. A /24 subnet contains 256 addresses with 254 usable hosts. Algorithm efficiency is described using Big-O notation, which characterises the worst-case growth of time or space relative to input size. O(1) is constant, O(log n) is logarithmic (binary search), O(n) is linear, and O(nยฒ) is quadratic. Cryptographic hash functions like SHA-256 produce a fixed 256-bit (32-byte) digest regardless of input length. File compression algorithms exploit statistical redundancy to reduce storage footprint, and compression ratio equals the original file size divided by the compressed size.

History

The history behind the Border Radius Generator traces back through the following developments. The conceptual foundation of modern computing traces back to Charles Babbage, whose Analytical Engine design of 1837 introduced the idea of a general-purpose mechanical computer with separate storage and processing units, including what he called the Store and the Mill. Ada Lovelace wrote what many consider the first algorithm intended for machine execution while annotating a translation of Luigi Menabrea's account of Babbage's work, also recognising the machine's potential to manipulate symbols beyond mere numbers. George Boole published "The Laws of Thought" in 1854, formalising a two-valued algebra of logic that would later map perfectly to electrical circuits. It remained largely a mathematical curiosity until Claude Shannon's landmark 1937 master's thesis demonstrated that Boolean algebra could describe switching circuits, laying the theoretical groundwork for all digital electronics. Shannon's 1948 paper "A Mathematical Theory of Communication" defined the bit as the fundamental unit of information and established information theory as a rigorous discipline. The same year, the transistor was invented at Bell Labs by Bardeen, Brattain, and Shockley, eventually replacing vacuum tubes and enabling miniaturisation at scale. ENIAC, completed in 1945, was one of the first general-purpose electronic computers, occupying 1800 square feet and consuming 150 kilowatts of power while performing roughly 5000 additions per second. The ASCII standard was ratified in 1963, assigning 7-bit codes to 128 characters and enabling interoperability between computers from different manufacturers. Through the 1970s, the microprocessor consolidated an entire CPU onto a single chip; Intel's 4004 in 1971 marked the beginning of this trend. The Apple II launched in 1977 and the IBM PC in 1981 brought computing to homes and offices, triggering a mass-market software industry. Tim Berners-Lee proposed the World Wide Web in 1989 and launched the first website in 1991 at CERN, transforming the internet from an academic and military network into a global information infrastructure. Mobile computing accelerated through the 2000s with smartphones integrating powerful processors, wireless networking, and GPS into pocket-sized devices, extending computation into every facet of daily life and cementing TCP/IP as the universal communications fabric.

Share this calculator

Explore More

Frequently Asked Questions

To create a perfect circle using CSS border-radius, you need two things: a square element (equal width and height) and a border-radius of 50% or a pixel value equal to half the width. For example, if your element is 200px by 200px, you can use border-radius: 50% or border-radius: 100px. Using 50% is preferred because it scales with the element size and works regardless of the actual dimensions. If your element is not square but rectangular, applying border-radius: 50% will produce an ellipse instead. For a pill-shaped button, you can use a very large value like border-radius: 9999px, which ensures full rounding on the shorter axis regardless of the element dimensions.
Pixel values and percentage values produce different results with border-radius, especially on rectangular elements. A pixel value creates a corner arc with a fixed radius regardless of the element size, so border-radius: 20px always creates the same curve. Percentages, however, are relative to the element dimensions, with horizontal radii calculated from the width and vertical radii from the height. On a 200x100 rectangle, border-radius: 50% creates an ellipse because 50% of 200px and 50% of 100px yield different horizontal and vertical radii. Pixel values are more predictable for design consistency, while percentages are useful for responsive designs where you want corners to scale proportionally with the element.
Yes, you can set border-radius values larger than the element dimensions, but the browser will automatically clamp them to prevent overlapping corners. According to the CSS specification, when the sum of adjacent border radii exceeds the size of the border box, the browser uniformly reduces all values proportionally until they fit. This means setting border-radius: 9999px on a 200px square element effectively produces the same result as border-radius: 100px, creating a perfect circle. This clamping behavior is actually useful for creating pill-shaped buttons because you can use an arbitrarily large value and the browser handles the math, ensuring the element always looks correct regardless of its actual dimensions.
Organic blob shapes are created by using different border-radius values for each corner, often combined with the slash syntax for elliptical corners. The basic approach is to set four different values like border-radius: 30% 70% 70% 30%. For more complex shapes, CSS supports the eight-value syntax with a slash: border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%, where values before the slash set horizontal radii and values after set vertical radii. This creates asymmetric, organic-looking shapes popular in modern web design. Combining these shapes with CSS animations that transition between different radius values can create fluid morphing effects. Many designers use blob generators to find the perfect values for their creative projects.
The border-radius shorthand follows a pattern similar to margin and padding. With one value, all four corners are equal. With two values, the first applies to top-left and bottom-right, while the second applies to top-right and bottom-left (diagonal pairs). With three values, the first is top-left, the second is top-right and bottom-left, and the third is bottom-right. With four values, they go clockwise: top-left, top-right, bottom-right, bottom-left. You can also use individual properties like border-top-left-radius for specific corners. The longhand properties also accept two values for elliptical corners, such as border-top-left-radius: 20px 40px, where the first value is the horizontal radius and the second is the vertical radius.
Border-radius has excellent browser support and has been widely supported since around 2012. All modern browsers including Chrome, Firefox, Safari, Edge, and Opera fully support the property without any vendor prefixes. The older prefixed versions like -webkit-border-radius and -moz-border-radius are no longer necessary unless you need to support very old browsers like Internet Explorer 8 or earlier Android browsers. Even Internet Explorer 9 and above support the standard unprefixed property. The only minor inconsistency across browsers relates to how border-radius interacts with certain other properties like outline or complex gradients, but for standard use cases, you can rely on consistent behavior across all platforms without any compatibility concerns.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings. ยฉ 2024โ€“2026 NovaCalculator.

Share this calculator

Formula

border-radius: TL TR BR BL

The border-radius shorthand accepts one to four values in clockwise order: top-left, top-right, bottom-right, bottom-left. When fewer values are given, they follow the same pairing rules as margin and padding.

Worked Examples

Example 1: Rounded Card Component

Problem: You need a card with 12px rounded corners on all sides for a dashboard UI component.

Solution: Set all four corner values to 12px.\nborder-radius: 12px;\nThis applies a uniform 12px circular arc to each corner.\nThe shorthand uses a single value since all corners are identical.\nResult: A clean, modern card with consistent rounding.

Result: CSS: border-radius: 12px; โ€” uniform rounded corners for a polished card look.

Example 2: Organic Blob Shape

Problem: Create an organic-looking shape for a decorative background element using asymmetric border-radius values.

Solution: Use different values for each corner to break symmetry.\nTop-left: 30px, Top-right: 70px, Bottom-right: 70px, Bottom-left: 30px\nborder-radius: 30px 70px 70px 30px;\nDiagonal corners share values for a balanced but organic feel.\nThe shape looks natural while maintaining visual harmony.

Result: CSS: border-radius: 30px 70px 70px 30px; โ€” an organic blob perfect for decorative elements.

Frequently Asked Questions

How do I create a perfect circle with border-radius?

To create a perfect circle using CSS border-radius, you need two things: a square element (equal width and height) and a border-radius of 50% or a pixel value equal to half the width. For example, if your element is 200px by 200px, you can use border-radius: 50% or border-radius: 100px. Using 50% is preferred because it scales with the element size and works regardless of the actual dimensions. If your element is not square but rectangular, applying border-radius: 50% will produce an ellipse instead. For a pill-shaped button, you can use a very large value like border-radius: 9999px, which ensures full rounding on the shorter axis regardless of the element dimensions.

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

Pixel values and percentage values produce different results with border-radius, especially on rectangular elements. A pixel value creates a corner arc with a fixed radius regardless of the element size, so border-radius: 20px always creates the same curve. Percentages, however, are relative to the element dimensions, with horizontal radii calculated from the width and vertical radii from the height. On a 200x100 rectangle, border-radius: 50% creates an ellipse because 50% of 200px and 50% of 100px yield different horizontal and vertical radii. Pixel values are more predictable for design consistency, while percentages are useful for responsive designs where you want corners to scale proportionally with the element.

Can border-radius values exceed the element size?

Yes, you can set border-radius values larger than the element dimensions, but the browser will automatically clamp them to prevent overlapping corners. According to the CSS specification, when the sum of adjacent border radii exceeds the size of the border box, the browser uniformly reduces all values proportionally until they fit. This means setting border-radius: 9999px on a 200px square element effectively produces the same result as border-radius: 100px, creating a perfect circle. This clamping behavior is actually useful for creating pill-shaped buttons because you can use an arbitrarily large value and the browser handles the math, ensuring the element always looks correct regardless of its actual dimensions.

How do I create organic blob shapes with border-radius?

Organic blob shapes are created by using different border-radius values for each corner, often combined with the slash syntax for elliptical corners. The basic approach is to set four different values like border-radius: 30% 70% 70% 30%. For more complex shapes, CSS supports the eight-value syntax with a slash: border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%, where values before the slash set horizontal radii and values after set vertical radii. This creates asymmetric, organic-looking shapes popular in modern web design. Combining these shapes with CSS animations that transition between different radius values can create fluid morphing effects. Many designers use blob generators to find the perfect values for their creative projects.

What is the shorthand syntax for border-radius in CSS?

The border-radius shorthand follows a pattern similar to margin and padding. With one value, all four corners are equal. With two values, the first applies to top-left and bottom-right, while the second applies to top-right and bottom-left (diagonal pairs). With three values, the first is top-left, the second is top-right and bottom-left, and the third is bottom-right. With four values, they go clockwise: top-left, top-right, bottom-right, bottom-left. You can also use individual properties like border-top-left-radius for specific corners. The longhand properties also accept two values for elliptical corners, such as border-top-left-radius: 20px 40px, where the first value is the horizontal radius and the second is the vertical radius.

Is border-radius supported in all modern browsers?

Border-radius has excellent browser support and has been widely supported since around 2012. All modern browsers including Chrome, Firefox, Safari, Edge, and Opera fully support the property without any vendor prefixes. The older prefixed versions like -webkit-border-radius and -moz-border-radius are no longer necessary unless you need to support very old browsers like Internet Explorer 8 or earlier Android browsers. Even Internet Explorer 9 and above support the standard unprefixed property. The only minor inconsistency across browsers relates to how border-radius interacts with certain other properties like outline or complex gradients, but for standard use cases, you can rely on consistent behavior across all platforms without any compatibility concerns.

References

Reviewed by Daniel Agrici, Founder & Lead Developer ยท Editorial policy