What Is the List of navigator.platform Possible Values? Complete Updated List (2024)
In the world of web development, understanding the environment in which your code runs is crucial for ensuring compatibility and a seamless user experience. One tool historically used for this is the navigator.platform property—a read-only string that returns the operating system (OS) platform on which the browser is running. While modern web standards have deprecated navigator.platform in favor of more secure alternatives, it remains widely referenced in legacy codebases and debugging workflows.
If you’ve ever wondered, “What values can navigator.platform return?” or need to debug platform-specific behavior, this guide is for you. We’ll break down the complete, updated list of navigator.platform values in 2024, explain their origins, and clarify which browsers still use them. We’ll also cover deprecation status, modern alternatives, and common pitfalls to avoid.
Table of Contents#
- What Is
navigator.platform? - Why
navigator.platformStill Matters (Even Today) - Deprecation Status & Modern Alternatives
- Complete List of
navigator.platformPossible Values (2024) - How to Test
navigator.platformValues - Common Misconceptions & Limitations
- Conclusion
- References
What Is navigator.platform?#
navigator.platform is a property of the Navigator interface in JavaScript, part of the Web API. It returns a string indicating the operating system platform on which the browser is running. Historically, it was used to detect whether a user was on Windows, macOS, Linux, iOS, Android, or other systems.
Example Usage:#
// Log the platform to the console
console.log("Your platform:", navigator.platform);
// Output (e.g., "MacIntel" on an Intel-based Mac, "Win32" on Windows 11)Unlike navigator.userAgent (which is a long, complex string), navigator.platform was designed to return a short, standardized value. However, its lack of standardization and privacy concerns have led to its deprecation.
Why navigator.platform Still Matters (Even Today)#
Despite being deprecated, navigator.platform hasn’t disappeared overnight. Here’s why it’s still relevant:
- Legacy Codebases: Thousands of websites and libraries (e.g., older analytics tools, plugins) rely on
navigator.platformfor platform detection. Updating them to use modern APIs is often time-consuming. - Debugging: Developers still use
navigator.platformto diagnose platform-specific bugs (e.g., “Why does this feature break on Linux but work on Windows?”). - Browser Compatibility: Not all browsers support modern alternatives like User-Agent Client Hints (UACH) yet (e.g., older versions of Safari).
Deprecation Status & Modern Alternatives#
Deprecation Notice#
navigator.platform is officially deprecated in the W3C specification and marked as “non-standard” by MDN Web Docs. Browsers are gradually phasing it out, with many now returning generic or misleading values to protect user privacy.
Why It’s Deprecated:#
- Privacy Risks:
navigator.platformcan be used to fingerprint users (e.g., distinguishing between 32-bit vs. 64-bit systems, or rare hardware). - Inconsistency: Values vary widely across browsers and OS versions, leading to unreliable detection.
- Lack of Standardization: No single body (e.g., W3C) governs
navigator.platformvalues, so browsers historically invented their own.
Modern Alternatives: navigator.userAgentData.platform#
The replacement for navigator.platform is the User-Agent Client Hints (UACH) API, specifically navigator.userAgentData.platform. UACH is a privacy-focused, standardized way to request platform information with user consent.
Example:#
// Check if UACH is supported
if (navigator.userAgentData) {
navigator.userAgentData.getHighEntropyValues(["platform"])
.then(data => console.log("UACH Platform:", data.platform));
// Output (e.g., "windows", "macos", "linux", "ios", "android")
}UACH returns standardized values like "windows", "macos", or "android", avoiding the ambiguity of navigator.platform. Most modern browsers (Chrome 89+, Edge 89+, Firefox 103+) support UACH, but Safari (as of 2024) still lacks full support.
Complete List of navigator.platform Possible Values (2024)#
Below is the most up-to-date list of navigator.platform values, organized by device type. Note: The values listed below are verified to still be visible in modern browsers, while other unlisted platforms may return generic or empty values.
Desktop Platforms#
| Value | Description | Browsers/Notes |
|---|---|---|
Win32 | Windows (32-bit or 64-bit). Modern browsers return this for all Windows versions (e.g., Windows 10/11 64-bit). | Chrome, Edge, Firefox, Brave (Windows). Legacy: "Win64" is no longer used. |
MacIntel | macOS with an Intel processor (e.g., MacBook Pro 2019). | Safari, Chrome, Firefox (Intel-based Macs). |
Linux x86_64 | Linux with a 64-bit x86 processor (most modern Linux desktops/laptops). | Chrome, Firefox, Edge (Linux). |
Linux i686 | Linux with a 32-bit x86 processor (rare; legacy hardware). | Older browsers on 32-bit Linux (e.g., Ubuntu 16.04). |
Linux armv7l | Linux with a 32-bit ARM processor (e.g., Raspberry Pi 3). | Browsers on 32-bit ARM Linux devices. |
Linux armv8l | Linux with a 64-bit ARM processor (e.g., Raspberry Pi 4/5). | Browsers on 64-bit ARM Linux devices. |
CrOS x86_64 | ChromeOS with a 64-bit x86 processor (e.g., Chromebooks). Some browsers return Linux x86_64 instead. | Chrome on ChromeOS (may return Linux x86_64 in 2024). |
FreeBSD | FreeBSD operating system (rare, mostly server/developer use). | Firefox, Chrome (FreeBSD). |
OpenBSD | OpenBSD operating system (security-focused, niche). | Browsers on OpenBSD (e.g., Firefox). |
Mobile Platforms#
Mobile values are more fragmented, as device manufacturers and browsers (e.g., Safari, Chrome, Samsung Internet) often return unique strings.
| Value | Description | Browsers/Notes |
|---|---|---|
iPhone | Apple iPhone (all models: iPhone 12–15, SE, etc.). | Safari, Chrome, Firefox on iOS (iPhone). |
iPad | Apple iPad (all models: iPad Pro, Air, Mini). Note: iPadOS 13+ may return MacIntel in some browsers (due to macOS-like user agents). | Safari, Chrome on iPad (most return iPad; check navigator.maxTouchPoints to confirm tablet). |
iPod | Apple iPod touch (obsolete; no longer produced). | Legacy iOS browsers on iPod touch (discontinued in 2022). |
Android | Legacy value for Android devices (rare in 2024). Modern browsers return Linux-based values. | Older Android browsers (pre-2020). |
Linux armv7l | Android with 32-bit ARM processor (e.g., budget Android phones). | Chrome, Firefox on 32-bit Android. |
Linux armv8l | Android with 64-bit ARM processor (most modern Android devices: Samsung Galaxy, Pixel). | Chrome, Firefox, Samsung Internet on 64-bit Android. |
Linux aarch64 | Alternative to armv8l for 64-bit ARM (e.g., newer Android tablets). | Some browsers on high-end Android devices. |
Windows Phone | Windows Phone (obsolete; discontinued in 2019). | Legacy browsers on Windows Phone (e.g., Edge Mobile). |
BlackBerry | BlackBerry OS (obsolete; replaced by Android-based BlackBerry devices). | Legacy BlackBerry browsers (discontinued). |
How to Test navigator.platform Values#
To see what navigator.platform returns on your device, use one of these methods:
1. Browser Console#
Open your browser’s developer tools (F12 in Chrome/Firefox, Cmd+Opt+I in Safari) and run:
console.log(navigator.platform);2. Simple HTML Snippet#
Create a minimal HTML file to display the value:
<!DOCTYPE html>
<html>
<body>
<h1>Your navigator.platform Value:</h1>
<script>
document.body.innerHTML += navigator.platform;
// Displays the platform directly on the page
</script>
</body>
</html>3. Cross-Browser Testing Tools#
Use tools like BrowserStack or Sauce Labs to test navigator.platform on rare platforms (e.g., Smart TVs, old Android devices).
Common Misconceptions & Limitations#
Misconception 1: “Win32 Means 32-Bit Windows”#
False. Modern browsers (Chrome, Edge, Firefox) return Win32 for both 32-bit and 64-bit Windows (e.g., Windows 10/11 64-bit). The Win64 value is legacy and rarely used today.
Misconception 2: “It Reliably Detects Mobile vs. Desktop”#
Not always. For example:
- iPads running iPadOS 13+ may return
MacIntelin some browsers (mimicking macOS to enable desktop-class websites). - Some Android tablets return
Linux armv8l(same as Android phones), making it hard to distinguish tablets from phones.
Limitation: Values Are Not Standardized#
There’s no official list of navigator.platform values, so browsers and OSes invent their own. For example:
- Both Safari and Chrome on Apple Silicon Macs return
MacIntel(they do not distinguish between Intel and Apple Silicon). - Some Linux distributions return
Linux x86_64, othersLinux i686, and ARM-based Linux returnsarmv7l/armv8l.
Limitation: Deprecation Risks#
Major browsers (Chrome, Firefox) plan to phase out navigator.platform entirely. By 2025, it may return generic values like "unknown" or be removed.
Conclusion#
navigator.platform remains a useful tool for debugging and legacy code, but its days are numbered. While this guide lists the most common 2024 values, always verify results with modern tools like User-Agent Client Hints (navigator.userAgentData.platform) for new projects.
Key takeaways:
- Use
navigator.platformsparingly and only for legacy support. - Adopt
navigator.userAgentData.platformfor standardized, privacy-respecting platform detection. - Test rigorously across browsers—values vary widely!
References#
- MDN Web Docs:
navigator.platform - W3C Deprecation Notice for
navigator.platform - User-Agent Client Hints Specification
- Chrome Platform Status: Deprecate
navigator.platform - Safari Release Notes
Let us know in the comments if you’ve encountered a rare navigator.platform value we missed! 🚀