What is the list of possible values for navigator.platform as of today?

Disclaimer: please note this property is sent by the browser and can thus be faked, just like user agent strings. Never rely on the navigator object to be completely accurate.

The definition

As far as I know there isn't a single public list of all possible `navigator.platform` values, even though the property has been around for quite a bit. To make things worse, the property's definition changed throughout the years. It used to be:

navigator.platform indicates the machine type for which the browser was compiled.

This basically means the property can return Win16 when the user is running a browser compiled for 16-bit, even though the user is on a 32-bit or 64-bit Windows machine.

Of course W3Schools lists the old definition (I'm not even gonna link to them). W3 and MDN have agreed on a different definition though:

navigator.platform represents the platform on which the browser is executing.

Still, this definition is a bit vague. A decade ago a 'platform' would either be a CPU architecture or an operating system. In recent years handheld and media devices can be platforms too.


The interpretation

As with everything on the web, our fate is in the hands of the mighty browser vendors. In this case, all the major browsers (IE, Safari, Firefox and Chrome) agree that my 64-bit Windows machine is a `Win32` platform. This means they're sticking to the old definition as far as Windows goes, because none of them are compiled for 64-bit thus far. Look on the bright side though: at least they all agree on something for once.

It seems like we're a bit luckier when it comes to handheld and media devices. As you've already stated in your question, the iPhone, iPod and iPad each got a unique value, even though they're all running the same operating system. All of Nintendo's and Sony's devices are returning unique values too. So only now navigator.platform is starting to look interesting.

But then Opera Mini for iPhone comes along, messing things up again. Opera Mini actually returns a code engine version number, which is a completely different interpretation of platform than anything we've come across so far. So now we're back where we started and we start to understand why there's so little information on this subject out there.

Even though the interpretations vary and I don't have a complete answer for you, I did feel like I should add my 2 cents for anyone else out there researching the navigator.platform property.


The list

Below is a (definitely non-definite) list of the values I know of that I could verify with multiple sources. Because of the vague definition, I'm not too sure what the best way to order these is. For now I divided them into a few categories based on operating system or device brand and listed additional information and release dates where applicable.

Android

It's really hard to test for Android devices. Android devices will return Android just as often as some version of Linux. For example on a Nexus 5 phone, both the Android browser and Chrome return Linux armv7l. In rare cases Android devices can even return null (instead of undefined).

  • Android (2008)
  • Linux: see notes above
  • null

Apple

As far as iOS goes: Safari, Chrome and Mercury agree, but Opera messes things up.

  • iPhone (2007)
  • iPod (2007)
  • iPad (2010)
  • iPhone Simulator: simulator shipped with Xcode
  • iPod Simulator: simulator shipped with Xcode
  • iPad Simulator: simulator shipped with Xcode
  • Macintosh
  • MacIntel: Intel processor (2005)
  • MacPPC: PowerPC processor
  • Mac68K: 68000 processor
  • Pike v7.6 release 92: Opera Mini 5 on any iPhone (2009)
  • Pike v7.8 release 517: Opera Mini 7 on any iPhone (2012)

BlackBerry

  • BlackBerry (2003)

FreeBSD

  • FreeBSD
  • FreeBSD i386: x86 (IA-32) processor
  • FreeBSD amd64: AMD x86-64 processor

Linux

Seriously unreliable because so many platforms are built on this. For example, Chrome on ChromeOS or Linux x86-64 both return Linux i686 as that's what they were compiled for.

Note Linux ARM lists architecture flags, e.g. armv5tej would denote a v5 ARM architecture with Thumb support ('T'), a DSP instruction set ('E'), and Jazelle support ('J').

  • Linux
  • Linux aarch64
  • Linux armv5tejl
  • Linux armv6l
  • Linux armv7l
  • Linux armv8l
  • Linux i686
  • Linux i686 on x86_64
  • Linux i686 X11: based on X11 Window System
  • Linux MSM8960_v3.2.1.1_N_R069_Rev:18: Sony Xperia V
  • Linux ppc64
  • Linux x86_64
  • Linux x86_64 X11: based on X11 Window System

Microsoft

Even on a 64-bit Windows 8 they all stick to Win32.

  • OS/2 (1994†)
  • Pocket PC
  • Windows
  • Win16: Windows 3.1x (1992†)
  • Win32: Windows 95 and up
  • WinCE

Mozilla (Firefox OS)

An empty string is returned in the web browser on Firefox OS. See this bug report.

KaiOS

The web browser on KaiOS (based on Firefox) also returns the empty string (same as Firefox OS). See this bug report.

Nintendo

  • New Nintendo 3DS (2014)
  • Nintendo DSi (2008)
  • Nintendo 3DS (2011)
  • Nintendo Wii (2006)
  • Nintendo WiiU (2012)

OpenBSD

  • OpenBSD amd64

Symbian / S40

  • Nokia_Series_40 (1999†)
  • S60 (2002†)
  • Symbian: Opera on Symbian
  • Symbian OS

Palm

  • PalmOS (1996)
  • webOS (2009)

Solaris

  • SunOS
  • SunOS i86pc
  • SunOS sun4u: SPARC processor

Sony

  • PLAYSTATION 3 (2006)
  • PlayStation 4 (2013)
  • PSP: PlayStation Portable (2004)

Various

  • HP-UX: Hewlett-Packard UniX
  • masking-agent: value changes to this when using Masking Agent for Firefox
  • WebTV OS
  • X11: X11 Window System

Have a device that's not on this list? Please leave a comment listing your device's properties and its navigator.platform value (feel free to use this JSFiddle to find the value).

Hope this helps.


I can add to this list with definitive values for specific devices I've tested.

Where the string is Linux armv7l, it ends in a lowercase L (for "Linux, presumably?), rather than being a number 1 or lowercase I.

For the iOS devices, testing was performed in Safari. For the Android devices, testing was performed in the stock browser, or Chrome if no stock browser was installed.

Of the Windows tablet devices, the Nokia Lumia was running Windows RT 8.1 with IE 11.0.9600.16476, and the MS Surface was running Windows 8.1 Pro with IE 11.0.9600.16438.

Of the Windows phones devices, the Nokia Lumia was running Windows Phone 8.1 and IE 11.

Phones

Device                           OS               window.navigator.platform
---------------------------------------------------------------------------
iPhone 4                         iOS 7.1          iPhone
iPhone 5                         iOS 7.1.1        iPhone
iPhone 5c                        iOS 7.1          iPhone
iPhone 5s                        iOS 7.1          iPhone

Samsung Galaxy S2                Android 4.1.2    Linux armv7l
Samsung Galaxy S3 Mini           Android 4.1.2    Linux armv7l
Samsung Galaxy S3                Android 4.3      Linux armv7l
Samsung Galaxy S4                Android 4.4.2    Linux armv7l
Samsung Galaxy Note 3            Android 4.4.2    Linux armv7l
Samsung Galaxy S6                Android 5        Linux aarch64

Nexus 4                          Android 4.4.2    Linux armv7l
Nexus 5                          Android 4.4.2    Linux armv7l

HTC One                          Android 4.4.2    Linux armv7l
Sony Xperia Z                    Android 4.2.2    Linux armv7l
Motorola Moto G                  Android 4.4.2    Linux armv7l

Nokia Lumia 1520                 Windows 8.1      Win32

Tablets

Device                           OS               window.navigator.platform
---------------------------------------------------------------------------
iPad 2nd generation              iOS 6.1.3        iPad
iPad 2nd generation              iOS 7.0.3        iPad
iPad 4th generation              iOS 6.1.2        iPad
iPad 4th generation              iOS 6.1.3        iPad
iPad mini (non retina)           iOS 6.1.3        iPad
iPad mini (retina)               iOS 7.0.3        iPad

Samsung Galaxy Tab 2 7"          Android 4.0.3    Linux armv7l
Samsung Galaxy Tab 3 7"          Android 4.1.2    Linux armv7l
Samsung Galaxy Tab 3             Android 4.2.2    Linux i686
Samsung Galaxy Note 10.1 (2012)  Android 4.1.2    Linux armv7l
Samsung Galaxy Note 10.1 (2014)  Android 4.3      Linux armv7l

Nexus 7 (2012) 7"                Android 4.4.3    Linux armv7l
Nexus 7 (2013) 7"                Android 4.3      Linux armv7l
Nexus 10                         Android 4.4.2    Linux armv7l

Lenovo Yoga                      Android 4.2.2    Linux armv7l
Sony Xperia Z                    Android 4.3      Linux armv7l
Tesco Hudl 7"                    Android 4.2.2    Linux armv7l
Kindle Fire 7" (2012)            Unknown          Linux armv7l
Kindle Fire HDX 7" (2013)        Unknown          Linux armv7l

Asus Transformer Pad TF300T      Android 4.0.3    Linux armv7l

Nokia Lumia 2520                 Windows RT 8.1   Win32
MS Surface Tablet Pro            Windows 8.1 Pro  Win64

Desktop PC (HP)                  Windows 7 Ent.   Win32
Desktop PC (iMac)                OSX 10.8.5       MacIntel

Tags:

Javascript