October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Chrome Headless

How to Take a Snapshot of an HTML Page: Save HTML, DOM, Screenshot, or PDF

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.

First choose what you mean by “snapshot”: a self-contained HTML file, a page saved with a separate folder of assets, the live DOM after scripts run, a visual screenshot, or a PDF. For a single portable HTML file, use the SingleFile extension or CLI. Firefox can save a page with its supporting files, while Firefox Developer Tools and Chrome headless can capture a full-page image. These outputs are not interchangeable.

Choose the kind of snapshot you need

A webpage can be captured in several forms. Pick the artifact that fits what you need to keep or do with it:

Need Recommended method What you get
One portable HTML file with page content and resources SingleFile extension or CLI A self-contained HTML file, subject to what the page and browser can capture.
HTML and supporting pictures/files kept separately Firefox “Web page, complete” An HTML file plus a resource directory; the original link structure may not be preserved.
Original HTML structure without pictures Firefox “Web page, HTML only” An HTML file without the page’s pictures.
DOM after page scripts have run Chrome headless --dump-dom A serialized DOM, not a raw response from a simple HTTP fetch.
Visual record of the page Firefox Developer Tools or Chrome headless screenshot An image, not an HTML document.
Printable or reading copy Chrome headless --print-to-pdf A PDF document.

For a one-file archive, SingleFile documents support for multiple browsers, including Chrome, Firefox, Edge, Safari, Vivaldi, Brave, Waterfox, Yandex, and Opera. Check the project’s current installation and compatibility details for your particular browser and device before installing.

Save a complete page as one HTML file with SingleFile

SingleFile is the most direct choice when the deliverable must be a single HTML file. Its browser extension has a simple toolbar workflow, and the project also documents a command-line interface. Installation and available options can differ by browser, so follow the instructions for the edition you use.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Install the SingleFile extension from the relevant browser store linked by the project README.
  2. Open the page you want to keep and click the SingleFile toolbar button. The documented default save location is the browser’s configured downloads folder.
  3. To capture only selected content or a frame, use the extension’s context menu. Its documented multi-tab choices include selected tabs, unpinned tabs, or all tabs.
  4. Open the saved file in a browser and verify that it contains the text, images, and other page details you need.

SingleFile also compares formats such as HTML, self-extracting ZIP, MHTML, Safari Web Archive, and HTML with a folder. Format compatibility varies: the project notes that MHTML viewing is limited to Chromium-based browsers and Internet Explorer, while Safari Web Archive is viewable in Safari. The project’s format table can help you choose a form your recipient can open.

A saved file is an archive, not a guarantee that every live interaction will keep working. The available documentation does not promise preservation of every interactive feature on every website. Check the result for your intended use.

Save a page with its pictures in Firefox

If separate resource files are acceptable, Firefox’s built-in Save Page As workflow provides two useful choices. Mozilla distinguishes a complete page saved with supporting files from an HTML-only copy.

  1. Open the page in Firefox and choose the browser’s Save Page As command.
  2. Choose a filename and destination.
  3. Select Web page, complete to save the page and pictures as a page file plus a resource directory. Keep the two together when moving or sharing the saved page.
  4. Select Web page, HTML only if you want the HTML without pictures. Mozilla says this option preserves the HTML link structure.
  5. Open the saved page and check that the assets you care about are available.

Mozilla cautions that the complete-page option may not preserve the original HTML link structure. The generated file-and-folder arrangement is useful when separate assets suit your workflow, but it is not the same packaging as a self-contained HTML file.

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

Capture a full-page visual screenshot in Firefox

A screenshot records appearance as an image. It is appropriate for visual reference or sharing, not for editing the saved page as HTML.

  1. Open Firefox Developer Tools settings.
  2. Under Available Toolbox Buttons, enable Take a screenshot of the entire page.
  3. Click the screenshot button. Firefox saves the image to the browser’s Downloads directory.

For a particular element or a state that needs a delay or hover, Firefox documents the Inspector’s Screenshot Node action and a Web Console :screenshot helper. Documented helper options include --fullpage, --selector, --delay, --dpr, --filename, and --clipboard. Consult the current Firefox documentation for exact syntax and behavior in your installed version.

Capture DOM, screenshot, or PDF with Chrome headless

Chrome headless is useful for command-line capture and automation. These are documented command patterns; executable names and command-line setup can vary by operating system and installation. Chrome for Developers explains that --dump-dom parses HTML, executes scripts that can alter the DOM, and then serializes that DOM as a string. That differs from retrieving the original response with a plain HTTP client.

Serialize the rendered DOM

chrome --headless --dump-dom https://example.com/

Save a viewport screenshot

chrome --headless --screenshot --window-size=412,892 https://example.com/

The command sets a 412-by-892 window size for the capture. The output is an image, not an HTML file.

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

Print to PDF

chrome --headless --print-to-pdf https://example.com/

Adjust capture timing

chrome --headless --timeout=5000 --dump-dom https://example.com/

--timeout=5000 caps the wait before capture. For pages with time-dependent code, Chrome also documents --virtual-time-budget=42000 to advance virtual time during capture:

chrome --headless --virtual-time-budget=42000 --dump-dom https://example.com/

Neither a timeout nor a virtual-time budget guarantees that network-dependent content or content requiring a user action has reached the state you want. Inspect the saved output. Chrome’s command-line reference was last updated 2024-10-21, so check it against your installed Chrome version if a flag behaves differently.

Or skip the browser setup

If you need a visual screenshot from code rather than a saved HTML document, ScreenshotNeo returns a screenshot or PDF from one GET request. This example requests a WebP capture of the target page:

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

See the ScreenshotNeo API documentation for setup and parameters. Cookie banners are accepted and removed before capture, along with supported newsletter popups and chat widgets; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, with response headers indicating the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents and MCP clients. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots.

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

Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.

How to choose and verify the result

  • Need one file? Use SingleFile, then open the saved HTML to check the content.
  • Need the HTML plus assets as separate files? Use Firefox’s complete-page option and keep the resource directory with the page.
  • Need searchable or script-updated markup? Choose a DOM capture such as Chrome --dump-dom, rather than a screenshot.
  • Need a visual record? Use a full-page screenshot tool; remember that the result is an image.
  • Need a printable document? Use PDF output.
  • Need to share the archive? Consider whether the recipient’s browser can open the chosen format, especially for MHTML or Safari Web Archive.
  • Need dynamic content? Check whether the content appears in the resulting artifact. A capture can reflect only the state reached at capture time.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting common snapshot problems

The saved page is missing pictures

Check which output you chose. Firefox’s Web page, HTML only intentionally omits pictures. For a browser-native copy with pictures, use Web page, complete and keep its resource directory alongside the HTML file. For a single-file archive, use SingleFile and inspect the resulting file.

The HTML file opens but its resources do not

If you used Firefox’s complete-page option, confirm that the generated resource directory was not separated from the page file. If you moved or renamed files, restore the pair to the same arrangement and reopen the page.

The DOM does not show content visible in the browser

Rendered pages can change after initial load. A Chrome headless wait flag may allow time-dependent code to run, but it cannot force content that depends on a user action or successful network response. Recheck the page state and inspect the DOM output.

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

The screenshot is not full-page

In Firefox, enable Take a screenshot of the entire page in Developer Tools settings under Available Toolbox Buttons, then use that capture action. In Chrome, the documented --screenshot example sets a window size; use a workflow intended for full-page capture when the entire document must be included.

The command is not recognized

The Chrome executable name and command-line setup depend on the system. Confirm that Chrome is installed and invoke the executable appropriate to your environment; the documentation’s chrome example may not match the local command name.

The saved copy differs from the live page

Snapshots preserve a captured state, not an assurance that every interactive or protected site feature can be reproduced. Check the specific text, images, or visual state you need and choose another output type if the first artifact is unsuitable.

Practical limits to keep in mind

HTML archives, rendered DOMs, screenshots, and PDFs each preserve different things. A screenshot is fixed visually; HTML or DOM output can be inspected as markup; a PDF is intended for document-style viewing. Resource packaging also matters: a single file is convenient to move, while a page-plus-folder output requires the directory to remain available. Browser versions, operating systems, and site behavior can affect commands and results, so verify the artifact on the device and in the viewer that matter to you.

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

Frequently Asked Questions

Does Chrome headless save the original HTML source with –dump-dom?

No. Chrome parses the document, runs scripts that may change the DOM, and serializes the resulting DOM. That differs from a raw source response.

Can I edit a screenshot as if it were HTML?

No. A screenshot is an image. Choose an HTML or DOM capture if you need markup.

Which Firefox save option keeps pictures?

“Web page, complete” saves the page and pictures with a supporting resource directory. “Web page, HTML only” omits pictures.

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.

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

Leave a Reply

Your email address will not be published. Required fields are marked *

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

Read next

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.