Markdown Cleaner
Clean messy Markdown from AI chats, Notion, or Word.
Cleanup options
Paste Markdown to see what can be cleaned.
- Input
- Markdown text
- Output
- Cleaned Markdown
- Processing
- In-browser
- Retention
- Stays on device
FAQ
Does the cleaner change code blocks?
No. Fenced code blocks, inline code spans, YAML front matter, and indented code are copied as-is. The cleanup rules only touch text outside those protected areas.
What does the add-missing-space option do?
It turns a line like #Heading into # Heading. The option is off by default because #hashtag and #2026 can look the same as a heading without a space.
How are tables fixed?
The cleaner pads short rows to the widest row, trims cell text, and normalizes the separator row. A table without a separator is left unchanged and counted as skipped.
Which HTML tags are converted?
Simple inline tags are supported: <b>, <strong>, <i>, <em>, <code>, <a href>, and <br>. Other HTML is left in place so the cleaner does not guess.
Will it preserve hard line breaks?
Yes. Two or more trailing spaces are normalized to exactly two spaces, which is the Markdown hard break. A <br> tag becomes a backslash hard break.
Is the output safe to run twice?
Yes. The cleaner is idempotent for its supported rules. Cleaning an already clean document returns the same text and a stats line with no changes.
What are the input limits?
The editor accepts up to 1 MB of text and 20,000 lines. Larger input shows an error and leaves the current output unchanged.
Will it change decimal numbers?
No. A line such as 1.5 million is treated as text, not as an ordered list, because there is no space after the dot.
More details & usage notes
A Markdown cleaner fixes the small formatting problems that make a document harder to read and harder to paste into a README. Text copied from ChatGPT, Claude, Notion, or Word often arrives with uneven heading spaces, mixed list markers, extra blank lines, ragged tables, non-breaking spaces, and leftover HTML tags. This tool normalizes those details while leaving fenced code blocks, inline code, YAML front matter, and indented code untouched. You see the cleaned Markdown and a rendered preview side by side, so you can check the result before copying it.
How to use Markdown Cleaner
- Paste the messy Markdown:
Drop in text from an AI chat, a Notion export, or a Word copy. Cleaning starts as you type.
- Choose what to clean:
Keep the safe defaults, or turn individual rules on and off. The add-missing-space rule is off by default because it can change hashtags.
- Check the stats and preview:
The stats line names what changed. Switch to Preview to see the cleaned Markdown rendered before you copy it.
- Copy or download:
Copy the cleaned Markdown into your editor, or download a
.mdfile. The original input stays in the left panel.
Tips for Markdown Cleaner
After cleaning, paste the result into Markdown Preview to check how headings, lists, and tables render.
If the document contains a table that needs to move into a spreadsheet, use Markdown Table Generator to convert it to CSV.
Keep the add-missing-space option off when your text contains hashtags. It is useful for
#Headingwritten by hand, but it cannot tell a heading from a tag.The cleaner is idempotent: running it twice produces the same output as running it once.
Decimal lines such as
1.5 millionare left alone. The cleaner only normalizes list markers it can identify safely.
Common use cases
- AI chat output:
Turn a long answer from ChatGPT or Claude into a clean README section without fixing blank lines and list markers by hand.
- Notion and Word exports:
Normalize Markdown that picked up smart quotes, non-breaking spaces, and leftover inline HTML during a copy and paste.
- Documentation cleanup:
Run an older document through the cleaner before publishing it, then check the rendered result in Markdown Preview.
- Pull request descriptions:
Clean a pasted description before review so headings, lists, and code samples render the same way in the pull request and in the editor.