← All tools
Free tool · Local processing

Markdown Cleaner

Tidy Markdown without losing its structure, or turn it into plain text. Keep your original, preview the result, and copy only when you are ready.

0 / 20,000 UTF-16 units

Clean Markdown keeps the structure; Plain text removes formatting and keeps link labels and URLs. Everything runs in this tab. No text is sent or saved, and long pastes are never cut.

Output mode: Clean Markdown

Enter Markdown or load the sample to begin.

Cleanup, preview and export

Clean Markdown standardizes CommonMark and GitHub-flavored Markdown, including tables, tasks, nested lists, references and code. Plain text keeps code, image descriptions, readable lists and tables, and link destinations.

The preview never executes HTML or loads images. Unsafe links are inactive here, but copied Markdown still contains the original HTML and URLs: another renderer may handle them differently.

Technical limits

The input limit is 20,000 UTF-16 units (an astral emoji uses two). Processing stops after 2 seconds, or when an AST or preview exceeds depth 64, 10,000 nodes, or the text result exceeds 100,000 UTF-16 units. A refusal keeps your entire input so you can simplify it and retry.

Before and after, element by element

Each output below was produced by this page’s own cleaner. Clean Markdown keeps the structure and standardizes the syntax; plain text drops the markers and keeps what a reader needs.

Headings
Your Markdown
##   Release notes

Setext title
============
Clean Markdown
## Release notes

# Setext title
Plain text
Release notes

Setext title
Links
Your Markdown
Read the [setup guide](https://example.com/setup) or <https://example.com/faq>.
Clean Markdown
Read the [setup guide](https://example.com/setup) or <https://example.com/faq>.
Plain text
Read the setup guide (https://example.com/setup) or https://example.com/faq.
Lists
Your Markdown
* Draft the note
* Review it

1) Ship
2) Announce
Clean Markdown
- Draft the note
- Review it

1. Ship
2. Announce
Plain text
• Draft the note
• Review it

1. Ship
2. Announce
Tables
Your Markdown
| Stage | Owner |
|---|:-:|
| Draft | Sam |
| Review | Ana |
Clean Markdown
| Stage  | Owner |
| ------ | :---: |
| Draft  |  Sam  |
| Review |  Ana  |
Plain text
Stage | Owner
--- | ---
Draft | Sam
Review | Ana
Code blocks
Your Markdown
```js
const total = 3;
```

Run `npm test` first.
Clean Markdown
```js
const total = 3;
```

Run `npm test` first.
Plain text
const total = 3;

Run npm test first.

Frequently asked questions

Should I choose Markdown or plain text?

Choose Markdown to normalize source formatting while keeping its parsed document structure. Choose plain text to remove presentation markers for readable text, retaining useful content such as link labels and destinations. Copy result copies the output for the selected mode, not the visual preview.

What happens to headings, lists, tables and code?

Markdown mode preserves supported CommonMark and GitHub-flavored Markdown structures, including headings, nested lists, tables, references and code blocks, though the source formatting can change. Plain text keeps heading text without its # markers, readable list and table boundaries and literal code content. Unsupported extensions may not behave like your original Markdown editor.

Does the safe preview make exported Markdown safe to execute?

No. The preview keeps raw HTML inert, replaces images with alt text and removes unsafe link destinations from active links. The cleaned source can still contain raw HTML or unsafe URLs, and plain text can retain them as text. Treat copied output according to the destination app; the preview is not an HTML sanitizer for exports.

Related reading

Want to polish a draft?

Open the editor to review writing suggestions. Your text is not transferred.

Open GenPolish