Google Chrome has a built-in “View Page Source” feature that shows the exact HTML a website’s server sent to your browser — before any JavaScript changes it. There are four reliable ways to reach it on desktop, plus a workaround for Chrome on Android, where the usual methods don’t exist.
Method 1: The keyboard shortcut (fastest)
With any page open, press:
| Platform | Shortcut |
|---|---|
| Windows / Linux | Ctrl + U |
| macOS | Cmd + Option + U |
Chrome opens a new tab showing the page’s raw HTML with line numbers, and the address bar reads view-source:https://…. This is the quickest method once you’ve memorised it.
Method 2: Right-click → View Page Source
- Right-click anywhere on the page (avoid images, links, and form fields, which show a different menu).
- Choose View Page Source from the context menu.
This does exactly the same thing as the shortcut and is handy when you’ve forgotten the key combination.
Method 3: The view-source: address-bar prefix
You can prepend view-source: to any URL directly in the address bar:
view-source:https://example.com
Press Enter and Chrome loads the source instead of rendering the page. This is useful for bookmarking a source view, or for pages where the right-click menu is disabled.
Method 4: The Chrome menu
The View Source option isn’t in Chrome’s three-dot menu by default, but the developer tools are:
- Click the ⋮ menu (top-right) → More Tools → Developer Tools.
- In DevTools, open the Sources panel to browse the page’s files, or the Network tab, click the document request, and read its Response.
Note that DevTools shows the live DOM, which can differ from the original source — see View Source vs Inspect Element.
Chrome on Android: no right-click, no Ctrl+U
Chrome for Android deliberately removes View Source — there’s no right-click and no keyboard shortcut. Two options work:
- The
view-source:prefix. Tap the address bar and type the URL with the prefix, e.g.view-source:https://example.com. Support is inconsistent between Android versions, but it often works. - Use an online viewer. Paste the URL into ViewSource.net — it fetches the raw HTML server-side and shows it with syntax highlighting, copy, and download. This works in Chrome on Android, Samsung Internet, and every other mobile browser. See our full guide on viewing source on mobile.
Reading the source once it’s open
Chrome’s native view source is plain and unformatted. When markup is minified onto one line, it’s hard to follow. A dedicated viewer like ViewSource.net adds:
- A Formatted tab that pretty-prints the HTML with proper indentation.
- One-click copy and download as
.htmlor.txt. - The response status, content type, and encoding shown above the code.
Troubleshooting: View Source not working in Chrome
- The menu item is missing or greyed out. You probably right-clicked an image, link, or input. Click empty page background instead, or use
Ctrl+U. - You see very little HTML. The site is likely client-side rendered (React, Vue, Angular): the server sends a small shell and JavaScript builds the page. That minimal shell is the real source — the visible content is assembled later. See why some pages won’t load.
view-source:does nothing on Android. Fall back to ViewSource.net.- A blank or error page. The URL may redirect, block bots, or return non-HTML. Our guide on HTTP headers explains what to check.
Frequently asked questions
What is the view source shortcut in Chrome? Ctrl+U on Windows/Linux, Cmd+Option+U on macOS.
How do I view source in Chrome on Android? Use the view-source: prefix in the address bar, or paste the URL into ViewSource.net.
What’s the difference between View Source and Inspect? View Source shows the original server HTML; Inspect (F12) shows the live DOM after JavaScript runs. More in View Source vs Inspect Element.
Want the source without touching Chrome’s menus at all? Paste any URL into ViewSource.net and read it instantly, on desktop or mobile.