ua-parser-js README

The project's README from github.com/faisalman/ua-parser-js. As one markdown file: README.md.

UAParser.js

UAParser.js UAParser.js UAParser.js

UAParser.js

Powerful User-Agent detection in a compact, ES5-friendly, dependency-free JavaScript library.

Demo

Documentation

Before upgrading from v0.7 / v1.0, please read CHANGELOG to see what's new & breaking.

Package Options

Open-Source Editions PRO / Commercial Editions
License options MIT (v1.x) AGPL (v2.x) PRO Personal PRO Business PRO Enterprise
Browser Detection ⚠️ ✅ ✅ ✅ ✅
CPU Detection ⚠️ ✅ ✅ ✅ ✅
Device Detection ⚠️ ✅ ✅ ✅ ✅
Rendering Engine Detection ⚠️ ✅ ✅ ✅ ✅
OS detection ⚠️ ✅ ✅ ✅ ✅
Enhanced+ Accuracy ❌ ✅ ✅ ✅ ✅
Bot Detection ❌ ✅ ✅ ✅ ✅
AI Detection ❌ ✅ ✅ ✅ ✅
Extra Detections (Apps, Libs, Emails, Media Players, Crawlers, and more) ❌ ✅ ✅ ✅ ✅
Client Hints Support ❌ ✅ ✅ ✅ ✅
CommonJS Support ✅ ✅ ✅ ✅ ✅
ESM Support ❌ ✅ ✅ ✅ ✅
TypeScript Definitions ✅ ✅ ✅ ✅ ✅
npm Module Available ✅ ✅ ✅ ✅ ✅
Direct Downloads Available ✅ ✅ ✅ ✅ ✅
Commercial Use Allowed ✅ ✅ ❌ ✅ ✅
Permissive (non-Copyleft) License ✅ ❌ ✅ ✅ ✅
No Open-Source Obligations ✅ ❌ ✅ ✅ ✅
Unlimited End-Products ✅ ✅ ✅ ❌ ✅
Unlimited Deployments ✅ ✅ ✅ ❌ ✅
1-year Product Support ❌ ❌ ✅ ✅ ✅
Lifetime Updates ✅ ✅ ✅ ✅ ✅
Price FREE* (License) FREE* (License) $14 (License) $29 (License) $599 (License)

GET THE PRO PACKAGES 📥

NEW: Managed REST API

Skip the installation, use the User-Agent API in any application:

Learn more and start building at uaparser.dev/#rest-api

Development

Contributors

This project wouldn't be possible without all the amazing people in the open-source community. Thanks to everyone who contributed, reported issues, and shared feedback.

Made with contributors-img.

Contributions are welcome! Please read the CONTRIBUTING GUIDE first for detailed contribution instructions.

Backers & Sponsors

Support the open-source editions of UAParser.js through one of the following options:

OpenCollective GitHub Sponsors PayPal WeChat/Alipay

ua-parser-js (faisalman/ua-parser-js)

commonjs
Searching Database…

What is this?UAParser.js is a compact, dependency-free JavaScript library that parses user-agent strings to detect browsers, OS, devices, CPUs, rendering engines, bots and AI crawlers.
Is it a library I embed in my own code, or a hosted service I call?A library you embed in your JavaScript, installed via npm or direct download and running in the browser or on the server. If you would rather skip installation, there is also a managed REST API powered by the same parser.
How do I add it to my project?Install the npm module or grab a direct download, then use it in browser, Node.js or another modern JS runtime. TypeScript definitions come included, so nothing else is needed to start.
Do I need anything besides JavaScript to run it?No. It is ES5-friendly code with no build requirements, and it runs in browsers, Node.js and other modern JavaScript runtimes on any Node version.
What does the free edition leave out compared to the PRO editions?The free editions flag core detections (browser, CPU, device, engine, OS) with a warning and exclude bot and AI-crawler detection, client-hints support and enhanced accuracy — those are reserved for the paid PRO tiers.
Can I use the free edition in a commercial project?Yes: v1.x is MIT and v2.x is AGPL-3.0, and both open-source editions allow commercial use. AGPL is copyleft, so the paid PRO editions ($14-$599) exist for teams needing a permissive license with no open-source obligations.
What can it actually detect?Browsers, CPUs, devices, rendering engines and operating systems in the free editions. The paid PRO editions add bot and AI-crawler detection, extra targets like apps, emails and media players, plus client-hints support and enhanced accuracy.
I'm on v0.7 or v1.x — is upgrading to v2 painless?Not automatically: the README says to read the CHANGELOG first because v2 has breaking changes, and the free license also moves from MIT to AGPL.
Does it work with ES modules and TypeScript?TypeScript definitions are included in every edition. Per the comparison table, ESM support arrived with the v2.x AGPL edition and the PRO editions, while the v1.x line is CommonJS-only.
How up to date is the detection data?It is backed by an actively maintained, extensive detection database, described as battle-tested at scale and trusted by leading tech companies.
What are similar projects?core-js, lodash, turndown, validator.js, lollipop-css, ky, marked, cheerio
Creator
faisalman
Size
20.9 MB
Stars
10.2K
Age
14y
Commits · 90 Days