Markdown Linter

Lint and validate Markdown files with detailed error reports and auto-fix

Issues will appear here after linting...

What is Markdown Linter?

Markdown linting checks your Markdown content for style violations, structural issues, and common mistakes. Just like code linters catch bugs and enforce style, a Markdown linter ensures your documents are well-structured, consistent, and render correctly across different Markdown processors. This tool implements 12 rules from the Markdownlint specification to catch issues like inconsistent heading styles, trailing whitespace, missing blank lines around headings, and bare URLs.

How to Use

  1. Paste your Markdown content into the input area, or click 'Load Sample' to try with example text containing intentional errors.
  2. Click 'Lint' to scan for issues — results appear on the right with severity levels, line numbers, and rule codes.
  3. Review each issue: errors indicate structural problems, warnings suggest style improvements, and info items are advisory.
  4. Click 'Fix All' to automatically correct fixable issues like trailing spaces, missing blank lines, and bare URLs.

Why Use This Tool?

Catch structural issues like skipped heading levels and missing top-level headings before publishing
Enforce consistent style with checks for heading format, blank line spacing, and line length
Auto-fix common issues with one click — trailing spaces, missing blank lines, bare URLs, and more
Improve rendering compatibility across different Markdown processors and static site generators

Tips & Best Practices

  • Run the linter, fix all issues, then lint again — some fixes may reveal previously hidden issues
  • MD013 (line length) is informational — long lines in Markdown don't break rendering, but short lines are easier to diff in version control
  • Use 'Fix All' first, then manually address remaining non-fixable issues like MD001 (skipped heading levels)

Frequently Asked Questions

What Markdown lint rules does this tool check?

This tool implements 12 rules: MD001 (heading increment), MD003 (heading style consistency), MD009 (trailing spaces), MD010 (hard tabs), MD012 (multiple blank lines), MD013 (line length), MD022 (blank lines around headings), MD026 (trailing punctuation in headings), MD032 (blank lines around lists), MD034 (bare URLs), MD040 (code block language), and MD041 (first line heading). These cover the most common Markdown style and structural issues.

What does 'auto-fixable' mean?

Some issues can be automatically corrected by the 'Fix All' button. Auto-fixable issues include: trailing whitespace (MD009), hard tabs (MD010), multiple blank lines (MD012), missing blank lines around headings (MD022), trailing punctuation in headings (MD026), missing blank lines before lists (MD032), bare URLs (MD034), and missing code block language (MD040). Issues like MD001 (skipped heading levels) and MD041 (missing top-level heading) require manual fixes because the correct content depends on your intent.

Why are trailing double spaces not flagged by MD009?

In Markdown, two trailing spaces at the end of a line create a hard line break (<br>). This is intentional Markdown syntax, so the linter does not flag double trailing spaces. Only three or more trailing spaces are considered unnecessary whitespace.

What is the difference between ATX and setext heading styles?

ATX headings use hash prefixes (# Heading, ## Subheading) and are the most common style. Setext headings use underlines (=== for h1, --- for h2) and only support two levels. MD003 requires you to pick one style and use it consistently throughout your document. ATX style is generally preferred because it supports all six heading levels and is easier to scan visually.

Why should bare URLs be wrapped in angle brackets?

Some Markdown processors don't automatically turn bare URLs into clickable links. Wrapping a URL in angle brackets (<https://example.com>) ensures it renders as a clickable link in all Markdown processors. It also makes the URL stand out visually in the raw Markdown source, improving readability.

Related Tools