Forum Moderators: open
There are plenty of sites that tried this and have a database online - just none of them are comprehensive ;)
From Krapulator's site:
28,592 user agents in my database
Do you really need them all, or are you looking at parsing for the most common user agents only? A lot of the user agent strings are very similar, and are for the same browsers.
Here's a list of the most common browsers' basic user agent strings (ie. without extra bits on the end):
Internet Explorer (Windows)
IE6 (on WinXP):
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
IE5.5 (on W2K):
Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
IE5.01 (on Win98):
Mozilla/4.0 (compatible; MSIE 5.01; Windows 98)
Mozilla variants
Mozilla 1.7 (on W2K):
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040608
Firefox 0.9.3 (on Linux):
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3
Netscape 7.1 (on WinXP):
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
Konqueror
KDE Konqueror (on Linux with a 2.6.7 kernel):
Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.6.7-3ajp; X11; i686) (KHTML, like Gecko)
Opera
Opera 7.54 (on WinXP):
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [en]
Opera/7.54 (Windows NT 5.1; U) [en]
(first example is spoofed as IE6, second without spoofing)
Mac browsers
Safari (on OSX):
Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.4 (KHTML, like Gecko) Safari/125.9
IE 5.23 (on MacOS):
Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC)
Netscape 4.79 (on MacOS):
Mozilla/4.79 (Macintosh; U; PPC)
Bots
Googlebot:
Googlebot/2.1 (+http://www.google.com/bot.html)
MSN:
msnbot/0.11 (+http://search.msn.com/msnbot.htm)
Yahoo:
Mozilla/5.0 (compatible; Yahoo! Slurp; [help.yahoo.com...]