A universal PHP library that parses user agents to detect browsers, operating systems, devices, brands, and models.
DeviceDetector is a PHP library that analyzes HTTP user agent strings and browser client hints to identify the client's browser, operating system, device type (e.g., smartphone, tablet, TV), brand, and model. It solves the problem of accurately detecting and categorizing the vast array of devices and software accessing web applications, which is critical for analytics, responsive design, and feature targeting.
PHP developers building web applications, analytics platforms (like Matomo), content management systems, or middleware that require device-aware functionality such as content adaptation, security logging, or user experience customization.
Developers choose DeviceDetector for its high accuracy, extensive and regularly updated detection rules, support for modern client hints, modular architecture allowing use of specific parsers, and compatibility with popular caching systems. It is the detection engine behind Matomo analytics and has ports in multiple languages.
The Universal Device Detection library will parse any User Agent and detect the browser, operating system, device used (desktop, tablet, mobile, tv, cars, console, etc.), brand and model.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Detects over 100 operating systems, 500 browsers, and numerous device types with brand and model details, as shown in the comprehensive, regularly updated lists in the README.
Allows using specific parsers like the bot parser independently for performance optimization, demonstrated in code examples for focused use cases.
Supports various caching systems including PSR-6/16 bridges, Doctrine, and Laravel, with built-in examples to enhance performance across requests.
Integrates browser client hints for more accurate detection on modern devices, improving reliability beyond user agent strings alone.
Limited to PHP environments, forcing developers in other stacks to use ports or alternatives that may lack feature parity or updates.
Parsing user agents can be CPU-intensive, and without proper caching, it may impact high-traffic applications, as acknowledged by the emphasis on caching configurations.
The library's full feature set requires configuration and dependencies, making it overkill for projects that only need basic device type detection.