ViewSource.net

How to View Source in Firefox

Updated July 22, 2026 · ViewSource.net Guides

Firefox has one of the best built-in “View Page Source” viewers of any browser — it adds syntax highlighting, line numbers, and clickable links out of the box. Here’s how to open it on desktop and mobile.

Method 1: Keyboard shortcut

Platform Shortcut
Windows / Linux Ctrl + U
macOS Cmd + U

Note the Mac shortcut is Cmd+U — different from Chrome and Safari, which use Cmd+Option+U.

Method 2: Right-click → View Page Source

Right-click an empty area of the page and choose View Page Source. Firefox opens the source in a new tab with syntax highlighting already applied.

Method 3: The view-source: prefix

Type a URL in the address bar with the prefix:

view-source:https://example.com

Firefox loads the highlighted source instead of rendering the page.

Firefox’s source viewer features

Firefox’s view-source: page is more capable than most:

  • Syntax highlighting and line numbers by default.
  • Clickable links — click a src or href to jump to that resource’s source.
  • A line-wrap toggle (right-click → Wrap Long Lines) so you don’t have to scroll horizontally.

For a formatted, copyable view with download options, you can still paste the URL into ViewSource.net.

View source in Firefox on Android

Firefox for Android supports the view-source: prefix in the address bar:

view-source:https://example.com

If that doesn’t work on your version, paste the URL into ViewSource.net, which fetches and displays the raw HTML in any mobile browser. See our view source on mobile guide for the full walkthrough.

Original source vs the Inspector

Firefox also has a full developer Inspector (F12 or Ctrl+Shift+I) that shows the live DOM after JavaScript runs — often different from the original HTML. View Page Source shows what the server actually sent. The distinction is explained in View Source vs Inspect Element.

Frequently asked questions

What is the view source shortcut in Firefox? Ctrl+U (Windows/Linux) or Cmd+U (macOS).

Does Firefox have a good built-in source viewer? Yes — it includes syntax highlighting, line numbers, and clickable links by default.

Prefer a formatted view you can copy and download? Open any URL in ViewSource.net.