Markdown Lint and Style Checker

Lint Markdown against ~15 markdownlint rules plus 2 Chinese-typography rules, with line-located reports and one-click auto-fix of safe issues

Tokenizes Markdown into blocks and runs a markdownlint-inspired rule engine (MD001/004/009/012/013/022/024/025/029/031/032/040/041/042/045/047) plus Chinese-typography rules (CN001 space between Chinese and Latin/digits). Reports each issue with its line, rule ID, severity, and a fix hint. Auto-fix applies only safe deterministic fixes (trailing whitespace, blank lines, list markers, trailing newline). Three rule sets: Default, Strict, Lenient.

Example Results

1 examples

Lint a README with mixed list markers and missing code language

Detect trailing whitespace, inconsistent list markers, a code fence without a language, heading-level jumps, and Chinese/English spacing issues, then auto-fix the safe ones.

Markdown lint report with auto-fixed output.
View input parameters
{ "markdown": "# Project\n\nIntro line. \n\n- item one\n* item two\n\n```\nconst x = 1\n```\n\n### Skipped h2\n\n## 使用Python3开发\n", "ruleSet": "default", "autoFix": true }

Key Facts

Category
Text & Writing
Input Types
textarea, select, checkbox
Output Type
html
Sample Coverage
4
API Ready
Yes

Overview

The Markdown Lint and Style Checker helps you validate and clean up your Markdown documents by scanning them against 15 standard markdownlint rules and Chinese-typography spacing guidelines. It provides line-by-line issue reports and offers a safe, one-click auto-fix for common formatting errors like trailing whitespaces, inconsistent list markers, and missing blank lines.

When to Use

  • Before publishing documentation, README files, or blog posts to ensure consistent formatting and style.
  • When editing mixed-language documents containing both Chinese and English/digits to automatically fix spacing issues.
  • To quickly clean up messy Markdown files by automatically fixing trailing whitespaces, consecutive blank lines, and missing list markers.

How It Works

  • Paste your Markdown content into the text area and select your preferred rule set (Default, Strict, or Lenient).
  • Enable the auto-fix option if you want the tool to automatically resolve safe, deterministic formatting issues.
  • Review the generated report highlighting specific rule violations, line numbers, severity levels, and suggested fixes.

Use Cases

Standardizing project README files before committing them to version control repositories.
Polishing technical documentation to ensure correct heading hierarchies and code block formatting.
Formatting bilingual Chinese-English articles to automatically insert proper spacing between different character sets.

Examples

1. Standardizing a Project README

Technical Writer
Background
A technical writer is preparing a project README that has inconsistent list markers, trailing whitespaces, and missing code block languages.
Problem
The document looks messy, violates standard Markdown guidelines, and lacks consistent formatting.
How to Use
Paste the README content into the Markdown input, select the 'Default' rule set, check 'Auto-fix safe issues', and run the checker.
Example Config
Rule Set: Default, Auto-fix: Enabled
Outcome
Trailing whitespaces are removed, list markers are unified to dashes, and a report highlights the missing code block language on line 8.

2. Fixing Bilingual Spacing in Documentation

Localization Engineer
Background
An engineer is translating documentation into Chinese and needs to ensure proper spacing between Chinese characters and English terms or numbers.
Problem
The translated text lacks spaces between Chinese and Latin characters (e.g., '使用Python3'), violating typography standards.
How to Use
Input the translated Markdown text, select the 'Default' rule set, and run the lint check.
Example Config
Rule Set: Default, Auto-fix: Enabled
Outcome
The tool flags the spacing issues and automatically inserts spaces to format the text correctly as '使用 Python 3'.

Try with Samples

markdown

Related Hubs

FAQ

What rules does the Markdown Lint and Style Checker validate?

It checks ~15 standard markdownlint rules (like heading levels, list markers, and code fences) and Chinese-typography rules (like spacing between Chinese and Latin characters).

What issues can the auto-fix feature safely resolve?

It automatically fixes trailing whitespaces, consecutive blank lines, inconsistent list markers, missing blank lines around headers/lists, and missing trailing newlines.

What is the difference between the Default, Strict, and Lenient rule sets?

Default checks standard rules; Strict adds strict line length (MD013) and ordered list prefix checks; Lenient suppresses style warnings to focus only on errors.

Does the tool modify my original Markdown structure or content?

No, it only fixes safe formatting issues. Structural issues like skipped heading levels or missing code block languages are reported for manual correction.

How does the Chinese-typography rule (CN001) work?

It detects and flags missing spaces between Chinese characters and Latin characters or digits, helping you maintain clean, readable bilingual text.

API Documentation

Request Endpoint

POST /en/api/tools/markdown-lint-style-checker

Request Parameters

Parameter Name Type Required Description
markdown textarea Yes -
ruleSet select No -
autoFix checkbox No -

Response Format

{
  "result": "
Processed HTML content
", "error": "Error message (optional)", "message": "Notification message (optional)", "metadata": { "key": "value" } }
HTML: HTML

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-markdown-lint-style-checker": {
      "name": "markdown-lint-style-checker",
      "description": "Lint Markdown against ~15 markdownlint rules plus 2 Chinese-typography rules, with line-located reports and one-click auto-fix of safe issues",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=markdown-lint-style-checker",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

If you encounter any issues, please contact us at [email protected]