How to change the user agent in Chrome

There are three ways: DevTools, a command-line flag, and an extension. They do not change the same things. We tested each one and list what a website still sees.

Short answer. For a quick test in one tab, use DevTools. To browse as another device for a while, use an extension that also changes Client Hints. The --user-agent flag changes the user-agent string only. In our test, Client Hints still reported the real browser and platform.

1. DevTools (one tab, while DevTools is open)

Chrome's own developer tools can override the user agent. These steps follow Chrome's documentation:

  1. Open DevTools (F12, or Ctrl+Shift+I on Windows and Linux, ⌘+Option+I on a Mac).
  2. Open the Network conditions panel. You can find it from the command menu: press Ctrl+Shift+P (⌘+Shift+P on a Mac) and type "network conditions".
  3. In User agent, clear Use browser default.
  4. Pick a user agent from the list or type your own.
  5. Optional: open User agent client hints, edit the values and click Update.
  6. Reload the page.

Good for: checking how one page reacts. Less good for: everyday browsing. The override belongs to the DevTools session of that tab, so you set it up again each time.

2. The --user-agent command-line flag (all tabs)

Chrome and other Chromium browsers accept a start-up flag that replaces the user-agent string for the whole browser. Close every Chrome window first, then start Chrome from a terminal. On Windows:

"C:\Program Files\Google\Chrome\Application\chrome.exe" --user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/15E148 Safari/604.1"

On a Mac:

open -na "Google Chrome" --args --user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/15E148 Safari/604.1"

Your install path may differ. The flag only lasts until Chrome is closed.

What the flag leaves behind (our test)

We started Chromium 145 and Microsoft Edge 157 on Windows with the iPhone user agent above, loaded a test page and recorded what it received. Both browsers gave the same result:

Where the site looksChanged to iPhone?What it still said
User-Agent headerYesiPhone Safari
navigator.userAgentYesiPhone Safari
navigator.platformNoWin32
Sec-CH-UA headerNoThe real browser name and version
Sec-CH-UA-Platform headerNo"Windows"
Sec-CH-UA-Mobile headerNo?0 (not mobile)
navigator.userAgentDataNoWindows, not mobile, real browser

A real iPhone sends no Client Hints at all, because Safari does not support them. So a site that compares these values sees an "iPhone" that reports Windows. More on this in why user agent switchers seem not to work.

3. An extension (all tabs, stays after a restart)

An extension is the easiest choice for browsing as another device over time. Check what it changes, though. Many switchers change only the header, or only the header and navigator.userAgent.

We make User-Agent Switcher — UA + Client Hints. It changes the header, navigator, iframes and the Client Hints together, so the values agree. Choosing Safari or Firefox removes the Chrome-only Client Hints, as a real Safari or Firefox would. Your choice stays after a restart.

User-Agent Switcher set to an Android phone: the User-Agent header, Sec-CH-UA headers and navigator.userAgentData all report Android

Get it on the Chrome Web Store

Check the result

Whatever method you use, open our user agent checker. It shows the header, JavaScript and Client Hints values side by side and flags any that disagree.