Skip to content

Random User Agent Generator - Create Browser Strings

Generate realistic user agent strings for Chrome, Firefox, Safari, and Edge on desktop and mobile. Free tool for browser testing and compatibility checks.

Random User Agent Generator

Generate random, realistic browser user agent strings for web development testing.

Generated User Agent

Loading calculator...
📚

Documentation

Random User Agent Generator

A random user agent generator creates sample user agent strings, the short lines of text a web browser sends to a website to identify itself. This tool builds strings that follow the real format used by Chrome, Firefox, Safari, and Edge, for both desktop and mobile devices, so developers can test how a site responds to different browsers without installing each one.

What Is a User Agent String?

Every time a browser requests a web page, it sends a User-Agent HTTP header. The header is a single line of text describing the browser name, its version, the operating system, and the rendering engine (the part of the browser that draws the page). A website can read this header to decide what page layout or features to send back.

A typical user agent string looks like this:

1Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
2

Nearly every browser starts its string with "Mozilla/5.0". This is a holdover from the 1990s, when websites checked for that word to decide whether a browser was capable enough to view a page. Newer browsers kept the token so they would not be blocked by old checks.

How This Generator Works

The tool has three controls:

  1. Device Type – Desktop or Mobile.
  2. Browser Family – Chrome, Firefox, Safari, or Edge.
  3. Operating System – Windows, macOS, or Linux for desktop; iOS or Android for mobile.

Not every combination exists in the real world, so the tool limits the choices. Safari only appears on macOS and iOS, because Apple does not ship Safari for Windows, Linux, or Android. Chrome, Firefox, and Edge are available on every listed operating system, including iOS, where they run as a shell over Apple's WebKit engine rather than their own engine.

Clicking "Generate New" builds a string from these three settings and a randomly chosen version number. The "Copy" button copies the result to the clipboard.

User Agent String Format by Browser

Each browser fills in a similar template with its own tokens.

Chrome (desktop):

1Mozilla/5.0 (platform) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/major.0.0.0 Safari/537.36
2

Chrome (Android):

1Mozilla/5.0 (platform) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/major.0.0.0 Mobile Safari/537.36
2

Firefox:

1Mozilla/5.0 (platform; rv:major.0) Gecko/trail Firefox/major.0
2

Safari (macOS and iOS):

1Mozilla/5.0 (platform) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/major.minor Safari/605.1.15
2

Edge (desktop):

1Mozilla/5.0 (platform) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/major.0.0.0 Safari/537.36 Edg/major.0.build.build
2

Edge (Android):

1Mozilla/5.0 (platform) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/major.0.0.0 Mobile Safari/537.36 EdgA/major.0.build.build
2

Since 2021, Chrome and Chromium-based browsers such as Edge have frozen most of their version number on desktop and Android to reduce the amount of identifying detail in the header, a change Google calls "User-Agent Reduction." Instead of a real build number, the Chrome token in these strings always reads major.0.0.0 (for example 128.0.0.0), and this generator matches that behavior. The exception is Edge's own token — Edg/ on desktop, EdgA/ on Android — and Chrome running on iOS (CriOS/), which still carry a full four-part build number, because Google's reduction policy does not apply to them.

Firefox has not adopted the same freeze. Its real version string is normally just two parts, major.0, and that is what the generator produces. A three-part Firefox version such as 95.0.2 can appear in the wild after a security patch, but this tool only generates the two-part form.

Example Outputs

Desktop Chrome on Windows:

1Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
2

Desktop Firefox on macOS:

1Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:130.0) Gecko/20100101 Firefox/130.0
2

Desktop Safari on macOS:

1Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Safari/605.1.15
2

Desktop Edge on Windows:

1Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.2903.86
2

Mobile Chrome on Android:

1Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36
2

Mobile Edge on Android:

1Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36 EdgA/128.0.2952.62
2

Mobile Safari on iPhone:

1Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Mobile/15E148 Safari/604.1
2

Mobile Firefox on Android:

1Mozilla/5.0 (Android 13; Mobile; rv:130.0) Gecko/130.0 Firefox/130.0
2

Desktop vs. Mobile Differences

Desktop strings name the operating system and, often, the processor architecture: Win64; x64 for 64-bit Windows, or Intel Mac OS X for a Mac. They stay fairly uniform, since there are only a handful of desktop platforms to represent.

Mobile strings usually add the word "Mobile" so a site knows to serve a touch-friendly layout. iOS devices identify themselves as "iPhone" together with the iOS version. Android is different: because of the same version-reduction policy that affects Chrome's build number, Chrome and Edge on Android always report the platform as Linux; Android 10; K, no matter which Android version or phone model is actually running. The "K" is a placeholder, not a real device code, and the real Android version is hidden. Firefox for Android does not freeze the version the same way and instead reports the real Android major version, but it does not include a device model at all. A generator that shows a specific phone model, such as a Galaxy model number, inside an Android Chrome string would not match how real, current Chrome behaves.

Why User Agent Strings Look Confusing

The string looks cluttered because of decades of compatibility patches. In the "browser wars" of the late 1990s, some sites sent better pages only to Netscape or only to Internet Explorer, checking for keywords in the header. Rival browsers responded by adding those same keywords to their own strings so they would not be turned away. That is why Chrome's string still mentions "Safari" and "like Gecko" even though it uses neither engine by that name. Each token is a leftover handshake meant to satisfy an old compatibility check rather than a truthful description of the software.

Because so many sites still parse these strings, browser makers cannot simply remove the clutter without breaking pages. The long-term replacement, called User-Agent Client Hints, sends browser details as separate, structured headers instead of one long string, but the classic User-Agent header is still sent everywhere for backward compatibility.

Common Uses

  • Compatibility testing. Check how a page renders when it detects a specific browser, without installing that browser.
  • Responsive design checks. Confirm that a site serves a mobile layout when it receives a mobile user agent, and a desktop layout otherwise.
  • Automated test suites. Feed a range of user agent strings into test scripts to check that browser-detection code handles each one correctly.
  • API and header testing. Verify that a server behaves correctly when different client types send requests.

Limitations

The user agent header is only one signal among many that a website can read. Scripts running in the page can check dozens of other details, such as installed fonts, screen size, and how the graphics card renders a test image, a technique called fingerprinting. Setting a Chrome user agent while actually browsing in Firefox will not fool a site that checks for these other signals; the mismatch is easy to detect. For everyday development and QA work, though, a correctly formatted generated string is enough to test how a site's server and client code react to different browsers and devices.

Frequently Asked Questions

What is a user agent string? It is a line of text a browser sends with every web request, naming the browser, its version, the operating system, and the rendering engine. Servers use it to decide what content or layout to return.

Why does the Chrome version always end in .0.0.0? Since 2021, Chrome has frozen most of the version number it reports in the User-Agent header to reduce fingerprinting. Only the major version number changes; the rest is fixed at .0.0.0. Edge and Chrome on iOS are the exceptions and still show a full build number.

Why doesn't the Android string show my phone model? Modern Chrome and Edge on Android report a fixed platform string, Linux; Android 10; K, for every device and every real Android version, as part of the same version-reduction policy that affects the Chrome build number. The real model and Android version are not exposed.

Can I use a generated user agent for web scraping? Changing the header is possible, but sites can detect a mismatch through other signals, and scraping may violate a site's terms of service or robots.txt rules. Check a site's policies before scraping it.

Is a generated string identical to a string from a real device? It follows the same format and token order as a real browser of that type. Because of Chrome and Edge's version freeze on Android, a generated Android Chrome string and a real one can be identical for the platform portion, since real devices report the same fixed value.

What is Client Hints, and does it replace the user agent string? Client Hints is a newer system that sends browser and device details as separate HTTP headers instead of one combined string. Browsers are adding support for it, but the classic User-Agent header remains in wide use because many existing websites still depend on it.