Network & Debug

User Agent Generator

Generate and copy a User-Agent sample for Mac Chrome, Windows Edge or iPhone Safari. Three preset strings for parser tests; versions are fixed examples.

Content reviewed:

About this tool

Choose Generate to randomly select one of three built-in User-Agent samples: Mac Chrome, Windows Edge or iPhone Safari. Copy the string for fixtures, documentation or a parser test.

The samples contain fixed version numbers. The generator does not detect your current browser, provide a version database or let you configure individual browser fields.

Best use cases

  • Create browser-string fixtures for tests.
  • Illustrate how platform, engine and browser tokens appear in a User-Agent header.

How to use it

  1. Click Generate to select a preset sample.
  2. Review the platform and version tokens; generate again if you need another sample.
  3. Use Copy result to copy the string into your test fixture.

One possible result: iPhone Safari

Output

Mozilla/5.0 (iPhone; CPU iPhone OS 18_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.2 Mobile/15E148 Safari/604.1

iPhone describes the device family; AppleWebKit describes the engine token; Version/18.2 and Safari/604.1 are example browser tokens. Generate may return either of the other two presets.

Scope and limits

  • Only three presets are available; random selection can return the same string twice.
  • Changing a header does not reproduce the browser's engine, features or device. User-Agent strings may be reduced or spoofed; use feature detection when testing capabilities.

Data processing

Samples are selected locally. Nothing is fetched from a browser-version service.

FAQ

Can I choose a browser or version?

This generator currently has three fixed presets selected at random. Edit the copied fixture yourself if your test needs another version.

Can a User-Agent prove a browser supports a feature?

No. A header is a reported string, not a capability test. Test the required feature directly.

Technical references

Related tools

More in this category