# ua-parser-js

> Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent & Client Hints data. Supports browser & node.js environment

Latest version **2.0.10** (published 2026-05-21) · AGPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install ua-parser-js
pnpm add ua-parser-js
yarn add ua-parser-js
bun add ua-parser-js
```

Provides the command `ua-parser-js`.

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score; high quality score; popular repo.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.10 |
| Published | 2026-05-21 |
| First published | 2012-07-28 |
| Weekly downloads | 0 |
| License | AGPL-3.0-or-later |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | * |
| Dependencies | 3 |
| Unpacked size | 1.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 10188 |
| Author | Faisal Salman |
| Maintainers | faisalman |
| Keywords | user-agent, client-hints, browser, engine, os, device, cpu, ua-parser-js, browser-detection, device-detection, os-detection, bot-detection, ai-detection, app-detection, crawler-detection |

## Links

- npm: https://www.npmjs.com/package/ua-parser-js
- Repository: https://github.com/faisalman/ua-parser-js
- Homepage: https://uaparser.dev
- Issues: https://github.com/faisalman/ua-parser-js/issues
- Funding: https://opencollective.com/ua-parser-js
- npm.io page: https://npm.io/package/ua-parser-js

## Dependencies (3)

- [ua-is-frozen](https://npm.io/package/ua-is-frozen.md) ^0.1.2
- [detect-europe-js](https://npm.io/package/detect-europe-js.md) ^0.1.2
- [is-standalone-pwa](https://npm.io/package/is-standalone-pwa.md) ^0.1.1

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 2.0.10 (latest) — 2026-05-21
- 1.0.41 (legacy) — 2025-08-19
- 2.0.0 (next) — 2024-11-18
- 2.0.9 — 2026-02-03
- 2.0.8 — 2026-01-13
- 2.0.7 — 2025-12-09
- 2.0.6 — 2025-10-10
- 2.0.5 — 2025-09-09
- 0.7.41 — 2025-08-19
- 2.0.4 — 2025-06-24
- 2.0.3 — 2025-03-14
- 2.0.2 — 2025-02-09
- 2.0.1 — 2025-02-04
- 1.0.40 — 2024-12-21
- 0.7.40 — 2024-12-21
- … 79 more at https://npm.io/package/ua-parser-js/versions

## README

[![https://uaparser.dev](https://raw.githubusercontent.com/faisalman/ua-parser-js/gh-pages/images/uap-header.png)](https://uaparser.dev)
[![https://uaparser.dev](https://github.com/user-attachments/assets/a626166c-17cc-45e3-8ff6-d7e948a5ded0)](https://uaparser.dev)
[![https://uaparser.dev](https://github.com/user-attachments/assets/50da50fc-7c8a-46e3-a2bc-6a8249914372)](https://uaparser.dev)
[![https://uaparser.dev](https://github.com/user-attachments/assets/9f2aaff0-a9b4-4ac9-bdf3-eea8081a2582)](https://uaparser.dev)
    
<p align="center">
<a href="https://www.npmjs.com/package/ua-parser-js"><img src="https://img.shields.io/npm/dw/ua-parser-js?color=red&logo=npm&label=NPM%20DOWNLOADS&style=for-the-badge"></a>
<a href="https://www.jsdelivr.com/package/npm/ua-parser-js"><img src="https://img.shields.io/jsdelivr/gh/hw/faisalman/ua-parser-js?logo=jsdelivr&style=for-the-badge"></a>
<a href="https://github.com/faisalman/ua-parser-js"><img src="https://img.shields.io/github/stars/faisalman/ua-parser-js?color=yellow&logo=github&style=for-the-badge"></a>
<a href="https://bundlephobia.com/package/ua-parser-js@1.0.35"><img src="https://img.shields.io/bundlephobia/minzip/ua-parser-js?logo=hackthebox&logoColor=white&style=for-the-badge"/></a>
<a href="https://github.com/faisalman/ua-parser-js/graphs/contributors"><img src="https://img.shields.io/github/contributors/faisalman/ua-parser-js?color=purple&logo=githubsponsors&style=for-the-badge"></a>
<a href="https://www.npmjs.com/package/ua-parser-js"><img src="https://img.shields.io/npm/v/ua-parser-js.svg?logo=npm&color=red&style=for-the-badge"></a>
<a href="https://cdnjs.com/libraries/UAParser.js"><img src="https://img.shields.io/cdnjs/v/UAParser.js.svg?color=orange&style=for-the-badge"></a>
<img src="https://img.shields.io/ossf-scorecard/github.com/faisalman/ua-parser-js?label=openssf%20scorecard&style=for-the-badge">
<a target="_blank" href="https://discord.com/channels/1406959509087453236/1406959509930381375"><img alt="Discord invite" src="https://dcbadge.limes.pink/api/server/https://discord.com/channels/1406959509087453236/1406959509930381375"></a>
</p>

# UAParser.js

The most comprehensive, compact, and up-to-date JavaScript library to detect user's browser, OS, CPU, and device type/model. Also detect bots, apps, and more. Runs seamlessly in the browser (client-side) or Node.js (server-side).

# Demo

  * Live demo: https://uaparser.dev


# Documentation

  * `version 1.x` : https://docs.uaparser.dev/v1
  * `version 2.x` : https://docs.uaparser.dev

Before upgrading from `v0.7` / `v1.0`, please read [CHANGELOG](CHANGELOG.md) to 
see what's new & breaking.

# Package & Pricing

<table>
    <thead>
        <tr>
            <th></th>
            <th colspan="2">Open-Source Editions</th>
            <th colspan="3">PRO / Commercial Editions</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>License options</td>
            <td>MIT (v1.x)</td>
            <td>AGPL (v2.x)</td>
            <td>PRO Personal</td>
            <td>PRO Business</td>
            <td>PRO Enterprise</td>
        </tr>
        <tr>
            <td>Browser Detection</td>
            <td><a href="#demo" title="Basic detection">⚠️</a></td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td>CPU Detection</td>
            <td><a href="#demo" title="Basic detection">⚠️</a></td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td>Device Detection</td>
            <td><a href="#demo" title="Basic detection">⚠️</a></td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td>Rendering Engine Detection</td>
            <td><a href="#demo" title="Basic detection">⚠️</a></td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td>OS detection</td>
            <td><a href="#demo" title="Basic detection">⚠️</a></td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td>Enhanced+ Accuracy</td>
            <td>❌</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td>Bot Detection</td>
            <td>❌</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td>AI Detection</td>
            <td>❌</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td>Extra Detections (Apps, Libs, Emails, Media Players, Crawlers, and more)</td>
            <td>❌</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td>Client Hints Support</td>
            <td>❌</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td>CommonJS Support</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td>ESM Support</td>
            <td>❌</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td>TypeScript Definitions</td>
            <td><a href="#demo" title="Community version">✅</a></td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td>npm Module Available</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td>Direct Downloads Available</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td>Commercial Use Allowed</td>
            <td>✅</td>
            <td>✅</td>
            <td>❌</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td>Permissive (non-Copyleft) License</td>
            <td>✅</td>
            <td><strong title="Copyleft license">❌</strong></td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td>No Open-Source Obligations</td>
            <td>✅</td>
            <td><strong title="Copyleft license">❌</strong></td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td>Unlimited End-Products</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td><strong title="1 end-product per license">❌</strong></td>
            <td>✅</td>
        </tr>
        <tr>
            <td>Unlimited Deployments</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td><strong title="1 TLD or deliverable per license">❌</strong></td>
            <td>✅</td>
        </tr>
        <tr>
            <td>1-year Product Support</td>
            <td>❌</td>
            <td>❌</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td>Lifetime Updates</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
            <td>✅</td>
        </tr>
        <tr>
            <td>Price</td>
            <td><strong title="Pay as you want">FREE<sup>*</sup> (<a target="_blank" href="https://raw.githubusercontent.com/faisalman/ua-parser-js/1.0.x/license.md">License</a>)</strong></td>
            <td><strong title="Pay as you want">FREE<sup>*</sup> (<a target="_blank" href="https://raw.githubusercontent.com/faisalman/ua-parser-js/master/LICENSE.md">License</a>)</strong></td>
            <td><strong title="$14 (one-time fee)">$14 (<a target="_blank" href="https://raw.githubusercontent.com/faisalman/ua-parser-js/pro-personal/LICENSE.md">License</a>)</strong></td>
            <td><strong title="$29 (one-time fee)">$29 (<a target="_blank" href="https://raw.githubusercontent.com/faisalman/ua-parser-js/pro-business/LICENSE.md">License</a>)</strong></td>
            <td><strong title="$599 (one-time fee)">$599 (<a target="_blank" href="https://raw.githubusercontent.com/faisalman/ua-parser-js/pro-enterprise/LICENSE.md">License</a>)</strong></td>
        </tr>
    </tbody>
    <tfoot>
        <tr>
            <th align="right" colspan="6">
                <h3><a target="_blank" href="https://uaparserjs.lemonsqueezy.com/buy/e236ea87-9b2b-400e-9683-24367f731b35"> GET THE PRO PACKAGES 📥</a></h3>
            </th>
        </tr>
    </tfoot>
</table>

# 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.

<a href="https://github.com/faisalman/ua-parser-js/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=faisalman/ua-parser-js" />
</a>

Made with [contributors-img](https://contrib.rocks).

Contributions are welcome! Please read the [CONTRIBUTING GUIDE](CONTRIBUTING.md) first for detailed contribution instructions.

## Backers & Sponsors

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

[![OpenCollective](https://img.shields.io/badge/OpenCollective-dddddd?style=for-the-badge&logo=opencollective&color=dddddd
)](https://opencollective.com/ua-parser-js)
[![GitHub Sponsors](https://img.shields.io/badge/GitHub_Sponsors-333333?style=for-the-badge&logo=githubsponsors&color=333333
)](https://github.com/sponsors/faisalman)
[![PayPal](https://img.shields.io/badge/Paypal-003087?style=for-the-badge&logo=paypal&color=003087
)](https://paypal.me/faisalman)
[![WeChat/Alipay](https://img.shields.io/badge/Other_Payment_Methods-Alipay_/_WeChat_Pay-09b83e?style=for-the-badge&logo=mastercard&color=09b83e
)](https://uaparserjs.lemonsqueezy.com/checkout/buy/3d71f2f3-cf4d-473c-892a-9d4497c890be)

<a href="https://opencollective.com/ua-parser-js"><img src="https://opencollective.com/ua-parser-js/organizations.svg?avatarHeight=64"></a>
<a href="https://opencollective.com/ua-parser-js"><img src="https://opencollective.com/ua-parser-js/individuals.svg?avatarHeight=64"></a>

---
_Source: https://npm.io/package/ua-parser-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
