How to view HTML source in Safari on Mac

How to view HTML source in Safari on Mac

Last updated: October 18, 2017 

view HTML source in Safari on Mac Watch the Video: How to view HTML source in Safari on Mac

In pretty much every web browser, it is easy to view the HTML source of a webpage. By default, users and developers alike know to right-click on a webpage and select View page source from the right-click menu. The keyboard command CTRL+U usually does the trick too. Apple has decided to Think Different with this feature where Safari on Mac is concerned. It is possible to view HTML source in Safari on Mac. But it is hidden by default.

The underlying HTML code that allows a web browser to render a page is not a secret. Code inspection, SEO, development, curiosity, and education are just a few reasons why anyone would want to the view HTML source of a webpage. Mac users who would like to access this capability more readily can show it in a few quick steps.

Open Safari Preferences

Get started by launching Safari on Mac. By default, the right-click menu does not display an option to view HTML source.

view HTML source in Safari on Mac

To show this feature, click Safari > Preferences.

view HTML source in Safari on Mac



In the Preferences window, click the Advanced tab. At the bottom of the Advanced tab, click the Show Develop menu in menu bar checkbox.

view HTML source in Safari on Mac

With the checkbox ticked, the Develop menu appears in Safari’s menu bar. Additionally, when you right-click in a web page, two new options display in the right-click menu:  Show Page Source and Inspect Element.

view HTML source in Safari on Mac

Also activated is the handy keyboard shortcut Command+Option+U, which does the same as selecting Show Page Source from the right-click menu. If needed, to hide the Develop menu, and the Show Page Source/Inspect Element right-click options, launch Safari Preferences. Untick the Show Develop menu in menu bar checkbox, and Safari is back to normal.


Thank you for visiting Tech Help Knowledgebase to learn how to view HTML source in Safari on Mac.

Image credit: Pixabay / markusspiske


Tech Help Knowledgebase

Tech Help Knowledgebase creates how-to articles and video tutorials for common issues, and provides technical support for the categories covered by our site.
Get Support.