Dev
Random User Agent Generator
Used by developers, writers, and creators worldwide.
A random user agent generator saves time whenever you need realistic UA strings for testing, scraping pipelines, or parser validation. Every browser request includes a User-Agent header identifying the client — browser name, engine, OS, and device type. Servers use this to route traffic, log sessions, and enforce access rules. When your code only ever sees one or two UA patterns, edge cases hide until production. This tool generates structurally correct strings following the real Mozilla/5.0 format, covering Chrome, Firefox, Safari, Edge, and crawlers like Googlebot. Set the count and filter by device type — desktop, mobile, tablet, or bot — to get exactly the sample you need for your test suite or seed file.
Loading usage…
Free forever — no account required
How to use
- Choose your options above
- Click Generate
- Copy your result
Detailed instructions
- Set the Count field to the number of UA strings you need — start with 10-20 for a varied test sample.
- Choose a Device Type from the dropdown to filter results to desktop browsers, mobile, tablet, or bot crawlers.
- Click Generate to produce the list of User-Agent strings matching your criteria.
- Copy individual strings or the full list and paste them into your test fixtures, HTTP client config, or seed data file.
- Re-generate as many times as needed — each run produces a fresh randomised set within the selected device category.
Use Cases
- •Seeding Jest or pytest fixtures for a ua-parser-js or ua-parser unit test suite covering 50+ device combinations
- •Rotating UA strings in a Playwright or Puppeteer scraper to test detection-avoidance logic before hitting production targets
- •Verifying that Express middleware returns the correct responsive layout when server-side rendering for mobile vs. desktop UA strings
- •Testing WAF rules in AWS or Cloudflare to confirm bot crawler signatures are flagged while real browser UAs pass through
- •Populating a staging analytics pipeline with mixed desktop, mobile, and bot traffic to validate session-classification logic
Tips
- →Generate separate batches per device type and combine them in a weighted ratio (e.g. 60/30/10 desktop/mobile/bot) to mirror realistic traffic.
- →When testing a UA parser, deliberately include bot strings alongside browser strings — many parsers misclassify obscure crawler UAs as desktop browsers.
- →Paste generated strings into https://developers.whatismybrowser.com to verify your parser's output matches the expected classification.
- →For scraper rotation testing, generate at least 50 unique strings — repeating the same handful of UAs too quickly is itself a detectable signal.
- →If you're testing Googlebot-specific server behaviour, filter to Bot type and verify your server returns the same content it would to a standard browser (cloaking violates Google's guidelines).
- →Freeze a generated set in your test fixtures rather than regenerating on every test run — stable fixtures make failures reproducible and diffs readable.
FAQ
how do I use fake user agent strings in my http requests for testing
Set the User-Agent header directly in your HTTP client — in fetch or axios pass it under headers, in curl use -H 'User-Agent: ...' , and in Postman add it to the Headers tab. Copy any generated string from this tool and drop it straight in. For rotation, paste a batch into an array and sample randomly per request.
are these user agent strings accurate enough to fool real servers
They follow the correct structural format — Mozilla/5.0 prefix, platform block, and engine comment — so they pass basic UA parsing and pattern matching. However, modern bot-detection systems cross-check UA strings against TLS fingerprints and header order, so rotating UA strings alone is not sufficient. Use them for dev and testing; respect each site's terms of service in production.
what's the difference between a desktop and bot user agent string
Desktop strings identify a human-operated browser like Chrome on Windows or Firefox on macOS, and typically include a full rendering engine comment. Bot strings identify automated crawlers like Googlebot or Bingbot and usually contain a crawler name plus a URL to the bot's documentation page. Filtering by device type here lets you test each category in isolation.