Live โ€” paste and fix instantly

Prettier, but for
markdown structure

Fix broken heading hierarchies, orphan list items, empty sections, and messy nesting. Paste markdown in, get clean markdown out.

๐Ÿ“

Heading Hierarchy

Detects when you jump from h1 to h3, skipping levels. Auto-fixes to maintain proper document flow.

๐Ÿ•ณ๏ธ

Empty Sections

Finds headings with no content beneath them โ€” dead sections that confuse readers and parsers alike.

๐Ÿ”—

Broken Nesting

Catches excessively deep or malformed list nesting that breaks rendering in most markdown viewers.

๐Ÿงน

Whitespace Cleanup

Strips trailing whitespace, collapses consecutive blank lines, and normalizes formatting throughout.

Before โ†’ After

One sweep transforms messy markdown into clean, well-structured documents.

Input (messy)
# My API Docs

##### Authentication  โ† skips h2, h3, h4

Use Bearer tokens.

## Endpoints

## Rate Limiting  โ† empty section

## Errors

Handle errors gracefully.
Output (swept)
# My API Docs

## Authentication  โ† fixed to h2

Use Bearer tokens.

## Endpoints

## Rate Limiting

_TODO: Add content for this section._

## Errors

Handle errors gracefully.

Try it now

Paste your markdown, hit Sweep, see the magic.

marksweep
Input
Output
Output will appear here after sweeping

Sweep Report

    API Endpoint

    Integrate MarkSweep into your pipeline with a single POST request.

    POST /api/sweep
    curl -X POST __APP_URL__/api/sweep \
      -H "Content-Type: application/json" \
      -d '{
        "markdown": "# Title\n\n##### Broken\n\n## Empty\n\n## Next\nContent",
        "options": { "fix": true }
      }'

    Response includes:

    {
      "output": "# Title\n\n## Broken\n\n...",
      "issues": [{ "type": "heading_hierarchy", "message": "..." }],
      "fixes": ["Fixed heading: h5 โ†’ h2"],
      "stats": { "issuesDetected": 3, "issuesFixed": 3 }
    }