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.
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.
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.
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.
| You want to… | Use |
|---|---|
| Check a mobile layout once | DevTools device toolbar |
| Test what the server returns for a bot or old browser | Either; a header rule stays on |
| Fool a JavaScript browser check | DevTools (it changes navigator.userAgent) |
| Always send a custom user agent to certain sites | A header rule |
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