How to Change the User Agent in Safari for Mac

In order to let websites serve browser-specific settings and pages, your browser sends a string called user agent to the websites that you visit on your computer. That way the target website gets to know what browser you are using and serves the pages accordingly. While most websites look the same in every browser, some have specific files that are only rendered when using a specific browser, Safari, for example. If you wish to see how a site looks in a specific browser, you can change the user agent in Safari on your Mac and pretend to be another browser.

When you change the user agent string, it technically changes the way websites interact with your browser. For example, if a site has a file that only renders when you’re using Chrome for Android, you can change the user agent to Chrome for Android in Safari and see that site as if you’re viewing it for real on your Android device.

Here’s how you can go about doing that.

Fire up Safari on your Mac from the dock.

Click on “Safari” in the top left corner and select “Preferences…” You will be taken to the preferences panel for your browser.

Open Preferences.

Once in the “Preferences” panel, click on the “Advanced” tab located in the top bar. It should open the advanced settings for your browser.

Click on the 'Advanced' tab.

In the “Advanced” tab, you should see an option that says “Show Develop menu in menu bar.” Tick mark it, and it will add a new menu in the menu bar for you to change the user agent.

Selected 'Show Develop menu in menu bar.'

Pull down the new menu by clicking on “Develop” in the menu bar. Then select “User Agent,” and you should see a list of the predefined user agents that you can use right away with your browser. Click on any and it will be selected.

Predefined user-agents.

If you can’t find the user agent you want to use, click on “Other” in the menu, and it will let you manually specify one.

Click on 'Other' to manually specify a user agent.

You should see a prompt asking you to enter a user agent string that you wish to use in Safari on your Mac. This part is usually used by the geeks or developers who know what a user agent looks like and how to write one. If you are unsure, you can use the help of the User Agent String website to try out various agents in your browser.

When you are done entering the string, click on “OK,” and it will save it for you.

Type a custom user agent string.

To check whether the new user agent works or not, just visit any site that lets you check what browser you are using, and it will tell you the name of the browser depending on what user agent you provided in the previous step. I have provided the Opera Mini user agent thus the browser check site says I’m using Opera Mini, although my actual browser is Safari.

Use browser check to see what your browser is.

The user agent has been changed in Safari on your Mac, and you are now telling websites that you don’t use Safari but use another browser because the user agent string says so.

If you are looking to see how a website looks like in another browser without actually downloading it, you can use the above method and have Safari pretend to be the browser you want.