ThisCalculator

Everyday

Change User Agent in Safari, Chrome & Firefox on Mac

Updated · Standard formula, shown below

Change User Agent in Safari, Chrome & Firefox on Mac

To change the user agent in Safari, Chrome, or Firefox on a Mac, you use each browser’s built-in developer tools—no extensions required. Safari lets you pick from preset user agents in its Develop menu, while Chrome and Firefox offer both preset options and the ability to enter a custom string.

What a User Agent Is and Why It Matters

A user agent is a short text string that your browser sends to every website you visit. It identifies the browser name, version, operating system, and sometimes more. For example, a typical Safari user agent on macOS might look like:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15

Websites use this string to decide how to render their pages. Some sites serve different layouts, features, or even entirely different content based on the user agent. For instance, a site might offer a mobile view to phones and a desktop view to computers. Changing your user agent lets you see what a site looks like on another browser or device, or bypass a site that wrongly blocks your actual browser.

How to Change User Agent in Safari on Mac

Safari hides its developer features by default. You must first enable the Develop menu, then you can switch user agents.

  1. Open Safari and go to Safari > Settings (or Preferences in older versions).
  2. Click the Advanced tab.
  3. Check the box at the bottom that says “Show features for web developers.�
  4. Close Settings. You’ll now see a Develop menu in the menu bar.
  5. Click Develop > User Agent and choose from the list—options include Safari for iOS, Chrome for Windows, Firefox for macOS, and others.
  6. To set a custom string, choose Other… and paste or type your own user agent.

This change applies to the current tab only and resets when you close that tab or quit Safari. If you want a permanent override, you’d need a third-party extension, but for most testing purposes the temporary change is enough.

How to Change User Agent in Chrome on Mac

Chrome’s developer tools give you both preset and custom user agent options. The process takes a few more clicks than Safari but offers more flexibility.

  1. Open Chrome and press Command+Option+I to open Developer Tools.
  2. Click the three-dot menu (â‹®) in the top-right of the Developer Tools panel.
  3. Select More tools > Network conditions.
  4. In the panel that appears, uncheck “Select automatically� next to User agent.
  5. Choose a preset from the dropdown, or select Custom… and type your own string.

The change affects the current tab only and lasts until you close the tab or reload the page with the setting cleared. You can also use the command-line flag --user-agent="string" when launching Chrome, but that’s more advanced and resets when you quit the browser.

How to Change User Agent in Firefox on Mac

Firefox also uses developer tools for user agent switching. It offers presets and a custom option, similar to Chrome.

  1. Open Firefox and press Command+Option+I to open Developer Tools.
  2. Click the responsive design mode icon (two overlapping rectangles) in the top-right of the toolbar, or press Command+Option+M.
  3. In the responsive mode toolbar, click the device dropdown (shows a device name like “iPhone� or “Responsive�).
  4. At the bottom of the dropdown, select Edit… and then Add Custom Device….
  5. Enter a name and paste your custom user agent string, then save.

You can also use the older Network panel in Developer Tools, but the responsive mode approach is the most straightforward. Like the other browsers, the change is temporary and applies to the current tab.

How to Choose the Right User Agent String

If you need a custom string, you must copy the exact format a real browser uses. Here are common examples:

  • Chrome on Windows 11: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
  • Safari on iPhone (iOS 17): 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 on macOS: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:120.0) Gecko/20100101 Firefox/120.0

You can find the exact current string for any browser by visiting a site like whatismybrowser.com on that device and copying what it reports. Using an outdated string may cause sites to treat you as an old browser and serve degraded pages.

Common Problems and Misconceptions

Changing your user agent is not the same as using a VPN or proxy. Websites can still see your IP address, and many can detect the real browser through other signals like JavaScript properties. This means some sites will ignore the user agent and serve the same content anyway.

Another common issue: after changing the user agent, a site might load its mobile version, but you may encounter layout glitches because your screen is still desktop-sized. This is normal; the user agent only tells the site what to send, not how to render it.

If the user agent change doesn’t seem to work, try reloading the page with Command+Shift+R (hard reload) to bypass cached content. Also, ensure you’re in the correct tab—developer tools apply to the tab you opened them from.

Alternatives to Changing User Agent

If your goal is to test a responsive design, you don’t need to change the user agent at all. Both Chrome and Firefox have built-in device emulation modes that simulate different screen sizes and touch events, which is more accurate for layout testing.

If you want to block ads or trackers, a user agent change won’t help. For that, use a content blocker extension or a private browsing window. If you want to appear as if you’re in another country, a VPN is the appropriate tool, not a user agent change.

Frequently Asked Questions

Does changing user agent affect all tabs?

No. In Safari, Chrome, and Firefox, the change applies only to the current tab and resets when you close it or quit the browser. To apply it globally, you’d need an extension or a command-line flag.

Can I change user agent on a Mac without developer tools?

Not in the built-in browsers. Safari’s Develop menu is hidden until you enable it, and Chrome/Firefox require Developer Tools. Third-party extensions like “User-Agent Switcher� can add a toolbar button, but they work by modifying the same underlying setting.

Will changing user agent break websites?

It can. If you set a user agent that doesn’t match your actual browser, some sites may load a version that isn’t compatible with your browser’s features, causing broken layouts or missing functionality. Always use a string from a real, current browser.

Is changing user agent legal?

Yes. It’s a standard feature provided by browsers for developers and users. However, some sites’ terms of service may prohibit misrepresenting your browser, so use it responsibly.

How do I reset to the default user agent?

In Safari, choose Develop > User Agent > Default. In Chrome, reopen Developer Tools, go to Network conditions, and re-check “Select automatically.� In Firefox, in responsive mode, choose “Responsive� from the device dropdown.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.