JavaScript Window outerWidth Property

Definition
window.outerWidth is the width of the whole browser window, including toolbars and borders.
Syntax
Read window.outerWidth with no parentheses.
| Call | What it does |
|---|
window.outerWidth | Full browser window width including chrome. |
Window property in browsers. No import required.
Parameters
| Parameter | Description |
|---|
| window.outerWidth | Read-only or assignable depending on the property. No function arguments. |
Return Value
| Return Value | Description |
|---|
| * | Full browser window width including chrome. |
JavaScript Examples
Example 1 — Basic Read
Beginner example for window.outerWidth.
console.log(typeof window.outerWidth);
console.log(window.outerWidth >= window.innerWidth);
How It Works
- Step. outerWidth is a number.
- Step. It is at least as large as innerWidth in typical desktops.
Example 2 — Practical Use
Beginner example for window.outerWidth.
console.log(window.outerWidth - window.innerWidth >= 0);
How It Works
- Step. The difference is mostly browser chrome.
Compatibility
Browser & Runtime Support
window.outerWidth is a standard Window property in browsers.
✓ Browser Window API
window.outerWidth
Available in all modern browsers. Not used in plain Node.js without a DOM.
Google Chrome Supported · Desktop & Mobile
Full support
Mozilla Firefox Supported · Desktop & Mobile
Full support
Apple Safari Supported · macOS & iOS
Full support
Microsoft Edge Supported · Chromium
Full support
Internet Explorer No native support · Use a polyfill
Polyfill
Opera Supported · Modern versions
Full support
Samsung Internet Supported · Android
Full support
Bun Supported · JavaScript runtime
Supported
Deno Supported · JavaScript runtime
Supported
Node.js Supported · Server runtime
Supported
Android WebView Supported · Modern WebView
Full supportwindow.outerWidth Excellent
Bottom line: Safe in browsers. Skip in server-only Node scripts.
Frequently Asked Questions
Width of the entire browser window including UI chrome.
Rarely for layout — prefer innerWidth for the page. Useful for window.moveTo / resizeTo math.
Not by assignment. Use resizeTo when the browser allows.
Open the Window Properties index for every property in this series.
Browse more properties
Continue through the Window properties list.
Next → CODETOFUN NEWS
Stay Ahead in Tech
Get the latest IT news, programming updates, and technology trends directly on your phone.
About the author
Developer, cloud engineer, and technical writer
I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.
9 people found this page helpful