Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>MarkDown CleanupNew to Visual Studio Code? Get it now.
MarkDown Cleanup

MarkDown Cleanup

Mike Wijnen

|
1 install
| (0) | Free
Cleanup Markdown content for nice and decent markdown files
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Markdown Cleanup

Markdown Cleanup is a Visual Studio Code extension that formats Markdown documents in place. It trims extra whitespace, normalizes spacing, and preserves structured blocks such as code fences, lists, headers, tables, and block quotes.

What it does

The formatter processes the active Markdown document and:

  • trims outer whitespace
  • normalizes line endings
  • keeps fenced code blocks unchanged
  • preserves headers, bulleted lists, numbered lists, tables, and block quotes as separate sections
  • applies a simple cleanup pass to plain text sections

How to use it

  1. Open a Markdown file in VS Code.
  2. Open the Command Palette with Ctrl+Shift+P.
  3. Run Markdown Cleanup.
  4. The extension replaces the current document contents with the formatted result.

You can also use VS Code's built-in format action on Markdown files because the extension registers a Markdown document formatting provider.

Supported markdown sections

  • fenced code blocks
  • headers
  • bulleted lists
  • numbered lists
  • tables
  • block quotes

Features

  • Works on the currently active Markdown editor
  • Exposes a command named Markdown Cleanup
  • Registers a Markdown formatter for standard VS Code format actions
  • Keeps code blocks untouched while formatting surrounding text

Requirements

  • Visual Studio Code 1.125 or newer
  • A Markdown file open in the editor

Extension settings

This extension does not currently require any custom settings.

Known issues

  • The formatter is intentionally simple and may not preserve every complex Markdown layout exactly.
  • Very customized spacing may be normalized to a more standard structure.

Release notes

0.0.1

Initial release of the Markdown Cleanup extension.

Repository

  • Source: https://github.com/capital-six/markdown-cleanup
  • Author: Mike Wijnen mike@capitalsix.nl

License

This project is licensed under the MIT License. See LICENSE.md for details.

Support

Feedback and suggestions are welcome if you want to improve the formatter further.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft