Why this matters
A webpage can look complete in an editor and still fail for visitors. A stylesheet may have been moved, an image may reference the wrong directory, a script may point to a deleted file, or a navigation link may contain a misspelled path. These failures are easy to miss during development because the browser often requests several assets before rendering the page, and a broken response may occupy only one line in a long list of network activity.
Source inspection helps because the visible page does not show every dependency. The HTML contains explicit references through attributes such as src, href, srcset, and poster. A relative reference such as /assets/site.css begins at the site root, while images/photo.jpg is resolved relative to the directory containing the document. Protocol-relative references such as //cdn.example.com/app.js inherit the page’s protocol. A URL that works in one location can therefore fail when copied elsewhere or used from a different directory.
The three tools in this guide support useful parts of that inspection, but none is a crawler or a dedicated broken-link validator. The html-formatter makes pasted or uploaded HTML easier to inspect. The html-minifier provides a compact live view of markup. The page-size-checker can analyze pasted HTML or a URL through its Analyze action, with a published limit of 1.6 MB. Together they help reveal and normalize source references; confirming that each referenced resource actually exists still requires checking the request results in a browser or an equivalent HTTP check.
The process
-
Define the page and its base URL before changing any paths. A root-relative path such as /assets/site.css only has an unambiguous meaning when the document’s origin is known. For local development, that origin might be http://localhost:3000; after deployment, it might be https://www.example.com. Keeping the deployment origin in view prevents a path that works locally from being mistaken for a path that works in production.
-
Open html-formatter and place the page source in the HTML Input area. Pasting is supported, and an HTML file can also be uploaded or dragged into the tool. If the tool reports “Please upload an HTML file”, the supplied file is not being accepted as the expected HTML input. If processing fails, the specific message begins with “Failed to process HTML:” and should be treated as a processing problem rather than evidence that the webpage has a broken asset.
-
Use the formatter’s format mode to expose the document structure without manually reindenting a dense file. Formatted markup is easier to scan for references inside headings, paragraphs, images, links, scripts, and stylesheets. The reason for formatting is diagnostic clarity, not a claim that formatted markup changes what the browser requests.
-
Search the formatted source for every externally stored dependency. Look for stylesheet links, script sources, image sources, image source sets, video posters, fonts, icons, and downloadable links. Distinguish references that should resolve to a deployed resource from ordinary navigation destinations. A hyperlink to another page is a different kind of check from a stylesheet or image: both use path syntax, but the former normally changes the document while the latter contributes to the current page.
-
Resolve each path by type. Root-relative paths begin with / and point from the origin’s root. Document-relative paths do not begin with a slash and are based on the current document’s directory. Absolute paths begin with a scheme such as https://. Protocol-relative paths begin with //. Paths containing ../ move toward a parent directory, so the depth of the page matters. A directory index such as /docs/ may also depend on server behavior, making it less suitable for a strict asset audit than an explicit file path.
-
Check each URL as a browser would request it. Open the page in its intended deployment environment and inspect the network activity for failed requests. A successful asset should return the expected response rather than an HTTP error or a response that is not the intended resource. For cross-origin assets, the request can also fail because of network access, certificate validation, DNS resolution, or server policy even when the URL is spelled correctly.
-
Use html-minifier as a second source-reading view if the original markup is difficult to compare with a compact version. The HTML Input and Minified Output areas update live, which makes the tool useful for spotting a reference that appears only once, disappears after whitespace changes, or differs from the surrounding markup. Minification is not a link test, and a successful minification does not prove that the referenced resources exist.
-
Use page-size-checker when the concern is the size of the pasted page or of a page reached by URL. Enter the input required by the url mode and select Analyze. The tool’s backend accepts a URL for that analysis. If the page source must be pasted instead, use the paste mode; “Paste some HTML first.” indicates that no source was supplied, while “Please enter a URL.” indicates that URL mode is missing its address. The result belongs in the audit as size information, not as proof that every linked asset was found.
Worked example
Suppose a small marketing page is deployed at https://www.example.com/products/widget/. Its source contains <link rel="stylesheet" href="/assets/site.css">, <script src="scripts/widget.js" defer></script>, <img src="../images/widget.png" alt="Widget">, and a navigation link to <a href="/support/">Support</a>. The first step is to identify what each path means. The stylesheet and support link begin at https://www.example.com. The script resolves under https://www.example.com/products/widget/scripts/widget.js. The image resolves under https://www.example.com/products/images/widget.png.
The source is pasted into the html-formatter under HTML Input and viewed in format mode. That inspection shows a suspicious case-sensitive filename: the source says Widget.PNG, while the deployed file is named widget.png. The spelling looks plausible in a thumbnail, but case-sensitive server storage can distinguish those names. The audit also reveals that the stylesheet points to /assets/site.css while the deployment actually stores it at /static/site.css. Changing the reference to /static/site.css aligns the HTML with the server’s actual layout.
After the corrections, the deployed page is loaded and its requests are checked. The browser should request https://www.example.com/static/site.css, https://www.example.com/products/widget/scripts/widget.js, and https://www.example.com/products/images/widget.png. Each should complete without an error response. The page-size-checker can then analyze the deployed URL with Analyze to record page-size information, while html-minifier can provide a compact comparison of the corrected source. None of those results replaces the failed-request check; the sequence works because source inspection identifies likely faults and the browser confirms the actual outcome.
Common mistakes
-
Assuming a visible image has a valid source. Broken images and fallback text can make a layout look intentionally sparse. The actual URL must be checked independently of its appearance.
-
Testing a root-relative path only from the homepage. A document-relative path can resolve differently from a page in a nested directory. Verify the path from the exact URL where the page will live.
-
Ignoring filename case. A request for Logo.PNG and a file named logo.png may be treated as different resources on a case-sensitive host.
-
Confusing an HTML formatter with a link checker. Reformatting the source can expose suspicious references, but it does not contact the server or establish whether those resources exist.
-
Treating minified output as equivalent to the original. The compact view is useful for comparison, but readers should not assume that two outputs are equivalent without checking the content. The tool’s role here is source inspection.
-
Checking only page URLs and skipping dependencies. A document may return successfully while its stylesheet, image, font, or script request fails. Each requested dependency matters to the final rendering.
-
Using a page-size result as an asset-existence result. A successful analysis or reasonable size does not prove that every resource referenced by the page was located.
Limitations of this approach
-
These tools do not provide a full broken-link crawler. They do not automatically discover every URL, traverse the site, or report a definitive pass or fail for each reference.
-
The page-size-checker has a published limit of 1.6 MB, so larger pasted pages are outside its stated range. The tools also do not establish server configuration, redirects, caching behavior, or the content type returned for every asset.
-
Source inspection can miss references assembled dynamically by JavaScript, inserted later by application code, or returned in data consumed by a client-side framework. A static HTML view cannot represent behavior that has not yet executed.
-
Browser checks can be affected by the environment. Authentication, geographic restrictions, CORS policies, expired certificates, and temporary network failures may make a request fail even when the URL is correct.
-
Manual inspection is the wrong instrument for a large site with many pages and thousands of internal links. It is best suited to a focused release, a specific template, or a small set of changed pages.
-
The html-formatter and html-minifier process HTML, not the full behavior of a deployed application. Their results cannot replace functional testing, server log review, or a deliberate HTTP-level check in every situation.
Frequently asked questions
Does html-formatter find broken links automatically? No. It formats pasted or uploaded HTML so that references are easier to inspect, but it does not provide a failed-link report.
Can html-minifier prove that a page has no missing assets? No. Its live HTML Input and Minified Output are useful for comparing markup and spotting references; they do not verify that the referenced resources exist.
What does page-size-checker tell me about missing assets? It analyzes pasted HTML or a URL and is relevant to page-size questions. A completed analysis does not certify the status of every image, script, stylesheet, font, or hyperlink.
Why did a root-relative asset work locally but fail after deployment? Root-relative paths depend on the origin. Local development may use http://localhost:3000, while production uses another host and possibly another directory structure. The browser checks the production origin.
Should relative paths always be changed to root-relative paths? Not automatically. Each form has different resolution rules. A document-relative path can be correct when the document has a stable location; a root-relative path can be correct when the asset is deliberately stored at the site root. Consistency with the deployment structure is what matters.
What is the difference between checking an image URL and checking a navigation link? An image URL is a dependency needed to render the current page, so a failure directly affects that page. A navigation link is a destination that may be checked separately by requesting it and confirming that it returns the intended page rather than an error.
Why inspect both formatted and minified HTML? Formatting makes nested references easier to read, while minification makes a compact comparison possible. For example, a formatter can make an image reference obvious within a long tag, and the minified view can help confirm that the same reference remains present after formatting changes.
What should happen before shipping? Correct the source, reload the deployed page, inspect the browser’s request results, and confirm that each expected asset completes successfully. Record the page-size analysis separately if page weight is part of the release criteria, without confusing that measurement with asset validation.