Skip to content

kmp-user-agent

Parse and generate User-Agent strings across Android, iOS, JVM, and JS from one Kotlin Multiplatform library, behind a single composable API.

See Core Concepts for the shared model and pack-composition pattern, then the Browser & Node.js guide to get started from JavaScript or TypeScript, the Android guide to get started from Kotlin, or the iOS guide to get started from Swift.

Try it live

This isn't a mockup -- it's your own browser, parsed right now by the real, published @lempert/user-agent package.

Your User-Agent: Detecting your browser…

BrowserLoading…
EngineLoading…
OSLoading…
DeviceLoading…
BotLoading…
AI AgentLoading…

"Not detected" can mean either that this browser/OS isn't recognized, or that the field isn't covered by the currently published package version.

Generate a User-Agent

Pick browser/engine/OS/device filters and generate a plausible User-Agent string -- also via the real, published @lempert/user-agent package. Leave any filter on "Any (random)" and it's filled in for you.

Generating…

Fields left on "Any (random)" are filled from a known-safe preset; picking both a browser and OS that don't normally pair together (e.g. Firefox + Android) still generates a valid string -- just without the OS detail.