How to change your user agent in Chrome

The user agent is the text your browser sends to say what it is, like "Chrome on Windows" or "Safari on iPhone". Changing it helps you test mobile layouts, browser checks, or what a search-engine bot sees. There are two ways, and they change different things.

1. DevTools (free, built in)

  1. Press F12 to open DevTools.
  2. Click the ⋮ menu, then More tools, then Network conditions.
  3. Under User agent, untick Use browser default and choose one, or paste your own.
  4. Reload the page.

This changes both the User-Agent header sent to servers and what the page's JavaScript sees in navigator.userAgent. It only lasts while DevTools is open, and only for that tab. For mobile layouts, DevTools' device toolbar (Ctrl+Shift+M) also sets the screen size, which usually matters more than the user agent.

2. A header rule (stays on, per site)

If you need a different user agent every time you visit certain sites, a header extension can set the User-Agent request header with a rule that stays on.

HeaderForge: User-Agent presets

Pick "Chrome on Windows", "iPhone Safari" or "Googlebot" from the presets, limit it to the sites you choose, and switch it on or off in one click. It also does request and response headers, one-click CORS, and blocking or redirecting requests. Free, with no analytics.

A header rule changes what servers receive. It does not change navigator.userAgent inside the page, so a site that checks the browser with JavaScript still sees your real browser. Use DevTools for that case.

Get HeaderForge for Chrome

Which should I use?

You want to…Use
Check a mobile layout onceDevTools device toolbar
Test what the server returns for a bot or old browserEither; a header rule stays on
Fool a JavaScript browser checkDevTools (it changes navigator.userAgent)
Always send a custom user agent to certain sitesA header rule

Also worth knowing

Chrome also sends Sec-CH-UA "client hint" headers that describe the browser. Some sites read those instead of the user agent. A header rule can remove or set them too.

More on this topic: ModHeader alternative · Requestly alternatives for modifying headers (2026) · 401 vs 403: which status code means what, and how to fix each · Hard refresh in Chrome, and how to really bypass the cache