Bowser is a compact JavaScript library that parses user agents and Client Hints to report browser, OS, platform, and engine details. It runs in browsers and in Node and offers filtering APIs for version rules.
Overview
Bowser helps applications detect which browser, operating system, rendering engine, and platform type a visitor uses. It exposes a parser API that returns structured name and version fields and supports convenience methods for reading those properties.
The package is a dual module usable with CommonJS require, ES modules, CDN script tags, and bundled builds that include polyfills when needed. An ES5 build is the default export for broad compatibility.
User-Agent Client Hints can be passed as a second argument so detection can use structured hints where available, with fallback to classic user-agent string parsing when hints are missing. Helpers expose hint brands, versions, and presence checks.
The satisfies API lets callers define version constraints per browser, OS, or platform category to branch behavior or compatibility workarounds. OS- or platform-specific rule blocks override generic browser rules when both are set.
Key features
- Browser name and version parsing
- OS and platform type detection
- Rendering engine identification
- User-Agent Client Hints support
- satisfies() version filtering rules
- Works in browser and Node
- ES5 and bundled polyfill builds
- parse() and getParser() entry points
Use cases
- Feature gating by browser version
- Analytics on client environment
- Targeted workarounds for specific browsers
- Server-side user-agent parsing in Node
- Client Hints-aware detection