Skip to content

Repository files navigation

broken-link-audit — Free Broken Link Scanner & Checker (CLI)

broken-link-audit is a free, open-source broken link scanner for SEO audits. Crawl any website from a single URL, find every broken internal link, image, video, and asset — with no URL cap and no paid API.

npx broken-link-audit https://yoursite.com

Unlike free tiers of Screaming Frog (500 URL limit) or paid tools like Ahrefs and Semrush, broken-link-audit runs entirely on your machine and reports which parent page each broken link appears on, so you know exactly what to fix.


Why use broken-link-audit?

broken-link-audit Screaming Frog (free) Ahrefs / Semrush
Price Free, open source Free (500 URL cap) Paid subscriptions
URL limit Unlimited 500 URLs Quota-based
Broken images & media Yes (img, video, audio, CSS) Limited in free tier Varies by plan
JS-rendered sites --render-js (Playwright) Paid license Varies
Parent page attribution Every issue shows the page it was found on Yes Yes
Runs locally Yes — no data sent to third parties Yes Cloud-based

Install

Requirements: Node.js 20+

npm install -g broken-link-audit

Or from source:

git clone https://github.com/jjf2009/broken-link-audit.git
cd broken-link-audit
npm install
npm run build
npm link

For JavaScript-heavy sites (React, Next.js, Vue):

npx playwright install chromium

Quick start

# Basic broken link check
broken-link-audit https://example.com

# Full site audit with reports
broken-link-audit https://example.com --output ./broken-link-audit-report/

# JS-rendered SPA
broken-link-audit https://example.com --render-js

# Also check external links
broken-link-audit https://example.com --check-external

Reports — fix issues by parent page

Every broken link report includes the parent page (the page where the bad link appears):

File What it contains
pages-with-issues.csv Start hereparent_page first, then broken URL, type, anchor text
pages-with-issues-summary.csv One row per parent page with issue count
report.html Visual report grouped by parent page
summary.txt Human-readable overview listing pages with issues
report.csv / report.json Full audit data

CLI options

Flag Description Default
--max-depth <n> Max crawl depth unlimited
--max-pages <n> Max pages to crawl unlimited
--concurrency <n> Crawl concurrency ceiling Crawlee autoscaled
--check-concurrency <n> Max parallel link checks 6
--timeout <seconds> Per-request timeout 10
--retries <n> Retries before marking broken 2
--render-js Render JS before extracting links off
--check-external Also check external link targets off
--use-sitemap / --no-sitemap Seed from sitemap.xml on
--respect-robots / --ignore-robots Honor robots.txt respect
--user-agent <string> Custom User-Agent BrokenLinkAuditBot/1.0
--output <path> Report directory ./broken-link-audit-report/
--format <csv|json|both> Export format both

What it checks

  • Page links<a href> internal and external anchors
  • Images<img src>, srcset, <picture> sources
  • Video & audio<video>, <audio>, <source> tags
  • Embeds<iframe>, <embed>, <object>
  • Assets<link href> stylesheets, icons, preload tags
  • Inline CSSurl() references in style attributes

FAQ

What is the best free broken link checker?

For unlimited crawls without a paid license, broken-link-audit is a strong choice: open source, runs locally, checks images and media (not just <a> tags), supports JS-rendered sites, and reports issues grouped by parent page.

How do I find broken links on my website?

broken-link-audit https://yoursite.com

Open broken-link-audit-report/pages-with-issues.csv — the parent_page column shows exactly which page contains each broken link.

Does it work with React / Next.js / Vue?

Yes. Use --render-js for headless Chromium via Playwright.

CI/CD usage

Exits 1 when broken links are found:

broken-link-audit https://staging.example.com || exit 1

Development

npm run build
npm test
npm run audit -- https://example.com

License

MIT — see LICENSE.

About

Free broken link scanner CLI — crawl any site, find broken links/images/media, report issues by parent page. No URL cap, no paid API.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages