Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To capture a page’s HTML, first decide whether you need the original document, the live DOM after scripts run, or the separate files the browser loaded. Use Firefox’s View Page Source for the initial HTML/XML, Chrome or Edge DevTools’ Sources panel for the document and its resources, and Safari’s Page Source or Web Archive save options when you need a file. These methods show different representations of the same page, so choosing the right one prevents missing content and broken offline copies.

What “page source” can mean

A browser page has more than one useful representation. The choice below determines what you actually capture.

What you need Use What you receive Important limitation
Original document source Firefox View Page Source The HTML or XML source representation opened in a separate tab It may not contain values inserted later by JavaScript or by an interaction
Current document structure Browser developer tools and the live DOM/Elements view The markup after the browser has processed scripts and user actions It is not necessarily the exact file delivered by the server
Loaded resources Chrome or Edge DevTools Sources panel The main document plus CSS, JavaScript, images, and other files in the resource tree It is a collection of resources, not a single self-contained archive
Offline copy Safari Page Source or Web Archive Either HTML only or an archive containing graphics and links Archive links work only while their destination pages remain available; some pages prevent items from being saved

“View Source” and a rendered-DOM inspection answer different questions. If a value is visible only after a script runs, inspect the current DOM instead of assuming it is present in the original source. If you need styles, scripts, or images, inspect the resource tree rather than copying one HTML tab.

Capture the original HTML or XML in Firefox

Open source in a new tab

  1. Open the page in Firefox.
  2. Right-click an empty area of the page and choose View Page Source.
  3. Firefox opens the source representation in a new tab. You can search it, select text, copy it, or save the tab from the browser’s normal save command.

Keyboard shortcuts are available: press Ctrl+U on Windows or Linux, or Cmd+U on macOS. The shortcut opens the same source view as the context-menu command.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option

Read the result correctly

Firefox documents this view as HTML or XML source. It is the document representation, not a promise that every string currently visible on screen appears in the file. A page can add or replace nodes after loading, so use a live-DOM inspection when you are investigating the final structure after scripts or clicks.

Use Chrome DevTools to find the document and its resources

Open the Sources panel

  1. Open the target page in Chrome.
  2. Open DevTools using the browser’s developer-tools command or the context menu’s inspect command.
  3. Select Sources.
  4. Open the Page tab. The top-level frame contains the page’s main document, while the resource tree lists other files loaded by the current page.

The resource tree is useful when you need to locate a stylesheet, JavaScript file, image, or another request alongside the HTML. Select a file to read it in the editor, then use the editor’s search and copy functions. This is a better fit than a simple source tab when your question is “which files did this page load?”

Inspect the page after it changes

For content that appears only after a click, form submission, menu expansion, or other script, inspect the live document in DevTools rather than relying on the initial file in Sources. Make the interaction first, then examine the resulting DOM. This distinction explains why a visible heading or value can be absent from the original HTML.

Use Edge DevTools for HTML, CSS, JavaScript, and images

  1. Open the page in Microsoft Edge.
  2. Open DevTools and select Sources.
  3. Choose the Page tab.
  4. Expand the current page’s frame and select the resource you want to inspect.

Edge’s Page tab lists resources used by the current webpage, including HTML, JavaScript, CSS, images, and other files. Use the main document when you need the delivered page file; use the other entries when you need the dependencies that make the page render.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Save source or an offline copy in Safari on Mac

Save HTML only

  1. Open the page in Safari.
  2. Choose File > Save As.
  3. For Format, choose Page Source.
  4. Choose a location and save.

Page Source saves only the HTML source code. This is appropriate when you want to read or reuse the markup in another web page, but it does not package the page’s graphics and other dependencies.

Rank #2
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • Brand: Wiley
  • Set of 2 Volumes
  • A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers

Save a Web Archive

  1. Choose File > Save As again.
  2. Set Format to Web Archive.
  3. Save the file where you can find it later.

A Web Archive includes graphics and keeps links usable while their destination pages remain available. Some webpages can prevent Safari from saving items shown on the page, so an archive is not guaranteed to reproduce every asset.

Show Safari’s developer tools when they are hidden

If Develop is missing from Safari’s menu bar, choose Safari > Settings > Advanced and enable Show features for web developers. The developer menu then becomes available for inspecting the live page and its resources.

Choose the right capture for dynamic pages

When the initial source is enough

Use Firefox View Source or the main document in a Sources panel when you need the markup delivered at the beginning of navigation: metadata, static headings, links, or server-rendered structure. Copying this representation preserves what was initially sent, which is useful for comparing responses or learning basic HTML.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When you need the rendered DOM

Use the live DOM after the page has finished loading and after you perform the relevant interaction. Single-page applications, filters, accordions, and client-side requests can alter the document without changing the original source file. Record the exact interaction before copying so another person can reproduce the state you inspected.

When you need a complete working copy

Use Safari Web Archive when the goal is an offline, browsable snapshot rather than text alone. For technical investigation, also collect the individual CSS, JavaScript, and image resources from Chrome or Edge Sources. Neither approach guarantees that an authenticated endpoint, a future destination URL, or content a site deliberately blocks will remain available offline.

Saving, searching, and handling large source files

  • Search before copying: use the source or DevTools editor’s find command for a distinctive element, attribute, class, or text string.
  • Preserve context: copy the surrounding element and its relevant attributes, not only the matching word, so you can identify its role later.
  • Keep the capture identifiable: record the page URL, date, browser, and whether you captured initial source or the post-interaction DOM.
  • Expect large files: minified scripts and data blobs can be much larger than the HTML document. Inspect only the resource needed for your question before exporting everything.
  • Protect sensitive data: source and resource files can contain private URLs, tokens in page data, personal information, or content visible only to your account. Remove secrets before sharing a capture.

Troubleshooting page-source captures

A value is visible but missing from View Source

The browser may have inserted it after load or after an interaction. Reproduce the state, then inspect the live DOM in developer tools. If the value comes from a separate request, locate the related resource in the Sources tree rather than expecting it in the initial document.

You cannot find CSS, JavaScript, or images

You are probably looking at HTML only. In Chrome or Edge, open DevTools > Sources > Page and expand the top-level frame. The resource tree separates the main document from its dependent files.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Safari has no Develop menu

Enable Safari > Settings > Advanced > Show features for web developers. Then reopen the page and use the developer tools.

The offline archive has broken links

A Web Archive keeps links working only while their destination pages remain available. Some pages also prevent certain items from being saved. For a stable record, retain the HTML and separately copy the specific resources you are legally permitted to keep.

The saved HTML does not preserve the original link structure

Saving formats can rewrite references or omit dependencies. Mozilla’s save-page guidance cautions that formats may not preserve the original HTML link structure. If link fidelity matters, keep the original URL with the capture and inspect the individual resources instead of relying on one saved file.

The page refuses to save an item

Some webpages can prevent saving items shown on the page. Capture the source or resource that is available, note what was blocked, and avoid treating the resulting file as a complete archive.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo is useful when your actual goal is a clean visual capture rather than copying HTML source. It renders a URL through its website screenshot API and can return PNG, JPEG, WebP, or PDF. It does not replace View Source or a DOM inspection: use the browser methods above when you need markup, scripts, or resource files.

One GET request is enough. See the ScreenshotNeo documentation for parameters and response details.

cURL

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

ScreenshotNeo removes cookie-consent banners, newsletter popups, and chat widgets before capture. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed; response headers identify the page verdict and whether the request was billed. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

Every plan includes the same features, such as full-page and element captures, device and viewport settings, dark mode, retina scale, PDF paper and page-range controls, custom CSS and JavaScript, click and wait actions, request blocking, headers, cookies, user-agent, authorization, timezone and geolocation, transparency, resizing, selectable cache TTL, signed image links, asynchronous webhooks, bulk capture of up to 100 URLs per call, a usage API, and an OpenAPI specification. The API accepts parameter names used by other screenshot services, which can simplify migration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Plan Included shots Price
Free 1,000 per month $0, no card
Starter 3,000 $5
Growth 15,000 $15
Pro 60,000 $39
Scale 250,000 $99
Business 1,000,000 $249

Yearly billing gives two months free. Start with 1,000 free screenshots a month with no card if a rendered image or PDF is what you need.

Best Value
Sale
JavaScript and jQuery: Interactive Front-End Web Development
  • JavaScript Jquery
  • Introduces core programming concepts in JavaScript and jQuery
  • Uses clear descriptions, inspiring examples, and easy-to-follow diagrams

Page source versus a screenshot

A source capture is text and structure: tags, attributes, and references to resources. A screenshot is a visual result after the page renders. Use source or DevTools for debugging markup, accessibility structure, SEO metadata, and loaded files. Use ScreenshotNeo when you need a shareable visual record, a PDF, an image for documentation, or automated captures across many URLs. Keeping that distinction clear prevents a screenshot from being mistaken for editable HTML.

Frequently Asked Questions

Can page source show server-side code or database records?

No. View Source and DevTools expose the document and resources delivered to the browser. Server-side templates, database queries, and other code that never reaches the browser are not part of the captured source.

Can I capture a page that requires a login?

Only if the browser session is authorized to view it and you handle the resulting private data securely. A saved source or archive can contain account-specific information, so remove credentials and personal details before sharing.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Bottom Line

Use Firefox View Page Source for the initial HTML/XML, Chrome or Edge Sources to inspect the document and loaded files, and Safari Page Source or Web Archive when saving HTML or an offline copy. For a rendered image or PDF instead of markup, use ScreenshotNeo.

Quick Recap

SaleBestseller No. 1
HTML and CSS: Design and Build Websites
HTML and CSS: Design and Build Websites
HTML CSS Design and Build Web Sites; Comes with secure packaging; It can be a gift option
$14.18
SaleBestseller No. 2
Web Design with HTML, CSS, JavaScript and jQuery Set
Web Design with HTML, CSS, JavaScript and jQuery Set
Brand: Wiley; Set of 2 Volumes
$35.05
SaleBestseller No. 3
SaleBestseller No. 5
JavaScript and jQuery: Interactive Front-End Web Development
JavaScript and jQuery: Interactive Front-End Web Development
JavaScript Jquery; Introduces core programming concepts in JavaScript and jQuery; Uses clear descriptions, inspiring examples, and easy-to-follow diagrams
$22.79

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.