Canvas roundRect()Baseline · Widely available
The roundRect() methods draw a rounded rectangle to a 2D canvas.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Apr 11, 2023. Widely available since Oct 11, 2025.
Browser support
DesktopChrome
1–98Not supported
99+Supportedsince Mar 1, 2022
Current: 155Edge
12–98Not supported
99+Supportedsince Mar 3, 2022
Current: 154Firefox
1–111Not supported
112+Supportedsince Apr 11, 2023
Current: 157Safari
1–16.3Not supported
16.4+Supportedsince Mar 27, 2023
Current: 27MobileChrome Android
18–98Not supported
99+Supportedsince Mar 1, 2022
Current: 155Firefox Android
4–111Not supported
112+Supportedsince Apr 11, 2023
Current: 157Safari iOS
1–16.3Not supported
16.4+Supportedsince Mar 27, 2023
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: roundRect.
Feature detection
JS · check before using
if ("CanvasRenderingContext2D" in globalThis && "roundRect" in CanvasRenderingContext2D.prototype) {
// CanvasRenderingContext2D.roundRect is available
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (2). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| CanvasRenderingContext2D.roundRect | 99 | 99 | 112 | 16 | 99 | 112 | 16 |
| OffscreenCanvasRenderingContext2D.roundRect | 99 | 99 | 112 | 16.4 | 99 | 112 | 16.4 |