View Page Source Shortcut (Ctrl+U / ⌘⌥U)
View a page's raw HTML source: ⌘⌥U on Mac, Ctrl+U on Windows. Opens the unrendered source in a new tab.
| Action | Mac | Windows | |
|---|---|---|---|
| View page source | ⌘⌥U | Ctrl+U | |
| Open DevTools (live DOM) | ⌘⌥I | F12 | |
| Find in source | ⌘F | Ctrl+F | |
| Save page | ⌘S | Ctrl+S | |
| Open Console | ⌘⌥J | Ctrl+Shift+J |
See the raw HTML
⌘⌥U (Mac) or Ctrl+U (Windows) opens the page's original, unrendered HTML source in a new tab. This is what the server actually sent, before JavaScript changed anything.
Source vs. the live DOM
View-source shows the static HTML; to inspect the page after scripts have run, open DevTools with ⌘⌥I / F12 and read the Elements panel instead. Safari has no view-source shortcut — use the Web Inspector's Sources tab.
Related: open DevTools shortcut (F12 / ⌘⌥I) to open the panels, or open the JavaScript console (⌘⌥J / Ctrl+Shift+J) to jump straight to errors.
FAQ
What is the view source shortcut?
Press ⌘⌥U on the Mac or Ctrl+U on Windows to open the page's HTML source in a new tab.
Why does the source look different from the page?
View-source shows the original HTML from the server. JavaScript often adds or changes elements after load, so use DevTools' Elements panel to see the live version.
Does view source work in Safari?
Safari has no Ctrl+U equivalent. Enable the Develop menu and use the Web Inspector's Sources tab instead.