Skip to main content

MD-LINK-CHECKER - Utility to check url, section reference, and path links in Markdown files

PyPi

This is a simple command line utility to check url, section reference, and path links in Markdown files. It iterates through the specified Markdown files and checks each link in the file for validity. If no file is specified then it defaults to checking README.md in the current directory. URL network fetches can be slow so they are checked simultaneously, doing a maximum 10 in parallel (by default but you can change that using the -p/--parallel-url-checks option). If you specify multiple files then all URLs across all files are extracted at the start so only unique URLs are checked and network fetches are minimised. There are a number of similar utilities available so why did I create another one? Well, all those that I tried didn't work!

E.g. check links in the README.md file in the current directory:

$ cd /path/to/my/project
$ md-link-checker

Check links in all the README.md files across your projects:

$ cd ..
$ md-link-checker */README.md

The latest version and documentation is available at https://github.com/bulletmark/md-link-checker.

Installation or Upgrade

Python 3.9 or later is required. You can run md-link-checker most easily using uvx. Just make sure uv is installed and then run the following command which will install md-link-checker from PyPi "on the fly" and will then run it immediately:

$ uvx md-link-checker [myfile.md]

Or install md-link-checker formally on your system using using uv tool (or pipx or pipxu). To install:

$ uv tool install md-link-checker

To upgrade:

$ uv tool upgrade md-link-checker

To uninstall:

$ uv tool uninstall md-link-checker

Command Line Options

Type md-link-checker -h to view the usage summary:

usage: md-link-checker [-h] [-u] [-p PARALLEL_URL_CHECKS] [-v] [-f] [-w]
                          [files ...]

Utility to check url, section reference, and path links in Markdown files.

positional arguments:
  files                 one or more markdown files to check, default =
                        "README.md"

options:
  -h, --help            show this help message and exit
  -u, --no-urls         do not check URL links, only check section and path
                        links
  -p, --parallel-url-checks PARALLEL_URL_CHECKS
                        max number of URL checks to perform in parallel
                        (default=10)
  -v, --verbose         print links found in file as they are checked
  -f, --no-fail         do not return final error code after failures
  -w, --no-warnings     do not print warnings for ignored URLs

License

Copyright (C) 2025 Mark Blakeney. This program is distributed under the terms of the GNU General Public License. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License at https://en.wikipedia.org/wiki/GNU_General_Public_License for more details.

Metadata

Release files for md-link-checker 1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for md-link-checker 1.10
File Size Uploaded
md_link_checker-1.10.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for md-link-checker 1.10
File Interpreter ABI Platform
md_link_checker-1.10-py3-none-any.whl Python 3 none any Details

Total release size: 13.4 kB

Release history Release notifications | RSS feed

This release

1.10 This release

2 release files

1.9

2 release files

1.8

2 release files

1.7

2 release files

1.6

2 release files

1.5

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page