We've updated — New tools, dark mode, and an improved experience. 🎉

Best User Agent for Testing

2026-03-15

When testing APIs and websites, the User-Agent header tells the server which browser and device is making the request. Using the right user agent can mean the difference between getting the full response and being blocked or served a different version of a page.

Popular User Agents for Testing

Here are common user agent strings developers use:

Chrome (Desktop):

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

Safari (iPhone):

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

Firefox (Linux):

Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0

When to Use Different User Agents

  • API testing: Use a generic Chrome user agent to simulate a real browser. Some APIs reject requests with non-browser user agents.
  • Mobile testing: Use an iPhone or Android user agent to trigger mobile-specific responses and responsive layouts.
  • Bot detection testing: Use a known bot user agent (Googlebot) to verify your robots.txt and bot handling.
  • Scraping: Rotate between multiple realistic user agents to avoid rate limiting. Never use a static user agent for high-volume requests.

Setting User Agent in cURL

curl -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...' https://api.example.com

Tip: Use our cURL Parser to extract and modify headers from existing cURL commands.

Generate Random User Agents

Instead of maintaining a static list, use our Random User Agent Generator to create fresh, realistic user agent strings on demand. Generate Chrome, Firefox, Safari, and mobile user agents. Copy and paste into your test scripts, Postman, or fetch headers.

Need to analyze a user agent? Try the User Agent Parser to see browser name, version, OS, and device type.

← Back to Blog