Dev
Mock User-Agent String Generator
User-agent parsing is one of those features that works fine for the browsers you tested with and breaks on the ones you did not. A good test suite covers Chrome on Windows, Firefox on Linux, Safari on macOS and iOS, and Edge — with varying version numbers — because each browser formats the string differently. Hand-picking a representative set from MDN every time you add a test is tedious; this tool generates a varied batch instantly. The generator assembles user-agent strings following the real format each browser uses. Chrome and Edge share the AppleWebKit/537.36 lineage; Firefox uses the Gecko engine string; Safari uses its own AppleWebKit build. OS tokens include Windows NT 10.0, macOS 10_15_7, Linux x86_64, and iPhone iOS 17. Version numbers are randomised within a plausible modern range. Choose how many you want, up to 10. Use the batch to seed analytics log fixtures, test browser-detection middleware, or verify that your parsing code handles each browser format without crashing. When an exact, current user-agent string is essential — such as replicating a specific bug — capture it directly from the browser you need.
How to use
- Choose your options above
- Click Generate
- Copy your result
Detailed instructions
- Choose how many strings you want.
- Click Generate to produce user-agent headers.
- Copy a varied batch into your tests.
- Use real strings when exact values matter.
Use Cases
- •Testing user-agent parsing logic
- •Seeding analytics or log fixtures
- •Building mock HTTP request headers
- •Checking browser-specific code paths
- •Generating varied sample request data
Tips
- →Test against a varied set of browsers.
- →Capture real strings for exact values.
- →Use them to seed analytics fixtures.
- →Cover both desktop and mobile platforms.
FAQ
what is a user-agent string
A user-agent string is a header a browser sends to identify itself — the browser name and version, the rendering engine, and the operating system. Servers and scripts use it to log traffic, adapt responses, or branch on the client.
which browsers and operating systems are covered
The generator covers Chrome, Firefox, Safari, and Edge. OS tokens include Windows NT 10.0, macOS 10_15_7, Linux x86_64, and iPhone iOS 17. Each browser uses its authentic string format, with randomised but realistic version numbers.
are these real user-agent strings
They follow the authentic format each browser uses and are realistic for testing, but they are generated rather than captured from live browsers. For exact, current values, copy real user-agent strings from the specific browsers you need to support.
You might also like
Popular tools from other categories that share themes with this one.
Try these next
More free tools from other corners of the catalog, picked by shared themes.