Returns a string that identifies the current operating system.


oscpuInfo = window.navigator.oscpu 
  • oscpuInfo is a string that takes the following form:
Operating system oscpuInfo string format
OS/2 OS/2 Warp x (either 3, 4 or 4.5)
Windows CE WindowsCE x.y1
Windows 64-bit (64-bit build) Windows NT x.y; Win64; x64
Windows 64-bit (32-bit build) Windows NT x.y; WOW64
Windows 32-bit Windows NT x.y
Mac OS X (PPC build) PPC Mac OS X x.y
Mac OS X (i386/x64 build) Intel Mac OS X x.y
Linux 64-bit (32-bit build) Output of uname -s plus "i686 on x86_64"
Linux Output of uname -sm

1x.y refers to the version of the operating system


function osInfo() { 
// returns: "Windows NT 6.0" for example


Unless your code is privileged (chrome or at least has the UniversalBrowserRead privilege), it may get the value of the general.oscpu.override preference instead of the true platform.


Specification Status Comment
HTML Living Standard
The definition of 'NavigatorID: oscpu' in that specification.
Living Standard Initial definition

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic support
Chrome No support NoEdge ? Firefox Full support YesIE ? Opera ? Safari ? WebView Android No support NoChrome Android No support NoEdge Mobile ? Firefox Android Full support YesOpera Android ? Safari iOS ? Samsung Internet Android ?


Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.

Document Tags and Contributors

Last updated by: sideshowbarker,