Asset Reference Checker
Find relative asset and link references in HTML and CSS and check them against a file list.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
2 reference(s): 0 missing, 0 external.
How it works
- Extracted every src/href attribute and every CSS url() reference.
- Classified each reference as external (scheme, protocol-relative or fragment) or local.
- Normalised the local path (stripped query/fragment and a leading ./ or /) and matched it against the file list.
- The file list is a newline/comma separated set of repository paths; with no list the references are reported but marked unchecked.
- SPA routes, server rewrites and trailing-slash rules are not modelled; a `missing` result means the literal path is absent from your list.
Methodology
- Extract src/href attributes and CSS url() references with a global match.
- Classify each as external (absolute, protocol-relative, scheme or fragment) or local.
- Normalise local paths and compare them to the supplied file set.
- Report totals plus the missing and external references with line numbers.
Usage
- Paste the HTML or CSS to scan.
- Optionally paste the list of files that exist, one per line or comma separated.
- Read the missing and external references with their line numbers.
Examples
These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.
One broken asset
{
"html": "<img src=\"images/logo.png\"><link href=\"styles/app.css\" rel=\"stylesheet\">",
"files": "images/logo.png\nstyles/app.css"
}Missing stylesheet
{
"html": "<link href=\"../css/main.css\" rel=\"stylesheet\"><img src=\"/img/hero.jpg\">",
"files": "img/hero.jpg"
}CSS url() reference
{
"html": ".hero { background: url('./bg/hero.webp'); }",
"files": "bg/hero.webp"
}Limitations
What counts as a local reference
A reference is local when it has no scheme (`https:`, `data:`, `mailto:`), is not protocol-relative (`//host`) and is not a bare fragment (`#id`). Those are reported as external and never fetched.
Local paths are normalised: a leading `./` or `/` is removed and any `?query` or `#fragment` is stripped, so `app.js?v=3` matches a listed `app.js`.
Frequently asked questions
- Why is a reference marked unchecked?
- When the file list is empty there is nothing to compare against, so every local reference is listed without a found/missing verdict.
- Does it check srcset?
- No. It checks the common `src`, `href` and CSS `url()` forms; `srcset` candidates are documented as out of scope.
Sources
- HTML Standard: URLs and attributes — WHATWG
- MDN Web Docs: url() — MDN
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.