Random User Agent Generator

Get one to five realistic user agent strings, sampled in proportion to real browser and device usage, each with a copy button.

Enter a number from 1 to 5 and press the button. Each result is a complete user agent string, for example Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Mobile Safari/537.36, shown on a card with a copy button. The strings are not assembled from random parts. They are sampled from the open-source user-agents library, which draws from a dataset of real browser traffic and picks each string in proportion to how often that browser and device combination is actually seen. Ask for five and you will usually get a couple of iPhone Safari strings, a Chrome on Android, and a desktop Chrome or Edge on Windows, because that is roughly what the web looks like.

What the generator does and does not do

The only control is the count, from 1 to 5 per press. There is no filter for device type, operating system or browser; if you need a desktop string and get three phones, press again. Every string is a real-world user agent that some browser sent at the time the dataset was collected, so version numbers, build tokens and platform strings are internally consistent. The trade-off is that the library ships a snapshot of the data, so the browser versions you see (currently around Chrome 119 and iOS 17) trail the newest releases by some months. That is fine for testing how a server parses user agents and for populating test fixtures; it is not a live feed of the latest builds.

How to read a user agent string

A user agent string is the value of the User-Agent request header that a browser sends with every HTTP request. Its format is a fossil record of browser history, which is why every modern browser claims to be Mozilla, Gecko and Safari at once. Taking a typical desktop Chrome string apart:

TokenMeaning
Mozilla/5.0Legacy prefix. Every browser sends it for compatibility with 1990s server-side sniffing.
(Windows NT 10.0; Win64; x64)Platform details in parentheses. Windows 11 still reports NT 10.0. On Android this is (Linux; Android 10; K), where "K" is a placeholder Chrome uses instead of the real device model since version 110.
AppleWebKit/537.36 (KHTML, like Gecko)Rendering engine claim. Chrome froze this at 537.36 years ago; iOS Safari reports 605.1.15.
Chrome/119.0.0.0The browser and its major version. Chrome now zeroes out the minor and build numbers as part of user agent reduction.
Mobile Safari/537.36"Mobile" flags a phone. The trailing Safari token is another compatibility relic.
Version/17.1.2 Mobile/15E148 Safari/604.1iOS Safari's pattern: the Version token is the real Safari version, and Mobile/15E148 is a frozen build ID.

Because Chrome, Edge and Safari have all frozen or reduced parts of the string, user agents from 2023 onward carry less information than older ones. Sites that need the exact OS version or device model are expected to ask for it through User-Agent Client Hints instead.

Where random user agents are useful

  • Testing a UA parser. If your analytics or logging code classifies traffic by browser and device, feed it a batch of generated strings and check that iPhones land in "mobile" and Windows Chrome lands in "desktop".
  • Responsive and adaptive server rendering. Some sites still serve different HTML by user agent. Paste a generated string into your browser's device toolbar or a curl -A flag to see what a phone user gets.
  • Seed data for logs and fixtures. Fake access logs, load-test scripts and demo dashboards look far more convincing with realistic user agents than with "TestAgent/1.0". Combine with the Random IP Generator for the client address column and the Random Email Generator for user accounts.
  • Scraper development. Developers rotating user agents in a crawler often start from a handful of real strings. Do this only within a site's terms of service and robots rules.
  • Privacy checks. Comparing a generated string with your own (visible in the network tab) is a quick way to see how much your browser reveals.

Other identifiers you may need alongside a user agent live in the same section of the site: the Random MAC Address Generator for hardware addresses, the Random API Key Generator for credentials in test configs, and all developer and test data tools.

Frequently asked questions

Are these real user agent strings or made up?

Real. The user-agents library samples from a dataset of strings observed in actual browser traffic and weights them by frequency, so you get the version numbers and platform tokens that browsers really send, not random combinations of parts.

Why do I get so many iPhone and Android strings?

Because the sampling follows real market share, and mobile devices make up more than half of web traffic. Desktop Windows Chrome and Edge strings still show up regularly; press again if the batch you got is all phones.

Can I choose desktop only, or a specific browser?

Not with this tool. It has a single setting, the number of strings per press (1 to 5). The strings are labeled well enough that it is easy to pick out the desktop or Firefox ones from a few batches.

Why is the Chrome version older than my browser?

The library bundles a snapshot of user agent data rather than fetching it live, so versions trail current releases. The structure of the strings is unchanged between versions, which is what matters for parser and layout testing.

Is it legal to send a random user agent?

Changing your own browser's user agent is legal and common; every browser has a device emulation mode that does it. Using rotated user agents to evade a site's access controls or scrape against its terms is a different matter and can breach those terms.