Markdown Table Cleaner
Clean up messy Markdown pipe tables copied from AI chats, READMEs, docs, and issue comments. Fix pipes, spacing, separator rows, and column alignment — all in your browser. Nothing is uploaded.
🔒 Your text is processed locally in your browser and never uploaded. We do not upload or store your text.
- 1 Paste your Markdown text (tables or mixed content)
- 2 Click Clean Tables
- 3 Copy the result or check the live preview below
Table preview
What this fixes
Markdown pipe tables copied from AI tools, GitHub, wikis, and documentation often arrive with inconsistent spacing, missing outer pipes, or mismatched column widths. This tool normalizes all of that:
- Uneven column spacing — each column is padded to a consistent width so columns visually line up in a monospace editor.
- Missing outer pipes — rows like
A | B | Care converted to| A | B | C |. - Malformed or missing separator rows — the
| --- | --- |separator is repaired if malformed, or inserted after the first row if absent (a notice appears when this happens). - Alignment markers preserved —
:---,---:, and:---:for left, right, and center alignment are detected and kept. - Column count mismatches — short rows are padded with empty cells rather than shifting content into the wrong column.
- Escaped pipes and inline code —
\|and`pipe|code`are not treated as column delimiters. - Multiple tables and surrounding text — each table is cleaned independently; paragraphs, headings, and other text between tables are left exactly as written.
- Fenced code blocks — lines inside
```or~~~fences are never touched, even if they contain pipe characters.
Before and after
Pasted Markdown
Name | Age | City --- | --- | --- Alice | 30 | New York Bob|25|London
After cleaning
| Name | Age | City | | ----- | --- | -------- | | Alice | 30 | New York | | Bob | 25 | London |
Markdown Table Cleaner vs Markdown Paste Cleaner
CopyTidy has two tools for Markdown content, and they do opposite things:
- Markdown Table Cleaner (this tool) — keeps tables as tables. It fixes alignment, spacing, and separator rows so your table stays valid Markdown, ready to paste back into a README, GitHub issue, or wiki editor.
- Markdown Paste Cleaner — removes Markdown formatting entirely, including table pipes and separator rows, leaving plain prose. Use that tool when you want a table's content as readable text rather than a formatted table.
Use the Table Cleaner to tidy a table you are editing or pasting into a Markdown context. Use the Paste Cleaner to extract content from a table into plain text.
Related tools
- Markdown Paste Cleaner — strip all Markdown formatting and turn tables into plain text.
- Find and Replace — rename terms or fix repeated typos inside your table cells before or after cleaning.
- Sort Lines — reorder the data rows of a Markdown table alphabetically or by length after cleaning.
- Text Diff Checker — compare the original messy table with the cleaned version to see exactly what changed.
Common questions
Does my text get uploaded anywhere?
No. We do not upload or store your text. All processing runs as JavaScript in your browser — nothing is sent to a server and nothing is stored after you close the tab.
What counts as a Markdown table?
This tool looks for groups of two or more consecutive lines that contain unescaped pipe
(|) characters. A single isolated line with a pipe is left untouched. Pipes
inside backtick code spans and escaped pipes (\|) are not treated as column
delimiters.
What happens if my table has no separator row?
The first row is treated as the header and a separator row is inserted below it. A notice appears below the toolbar to let you know this happened. All remaining rows become data rows.
Will it change my cell content?
No. Only whitespace used for alignment padding is added or removed. The text inside your cells — including special characters, Unicode, and inline Markdown — is preserved exactly as you pasted it.
What does the preview show?
After cleaning, a read-only HTML table preview appears below the toolbar so you can confirm that columns and alignment look correct before copying. The preview renders the parsed cell content as an HTML table and does not render other Markdown syntax such as bold or links inside cells.
Is this an AI tool?
No. This is a deterministic parser that applies fixed rules — the same input always produces the same output. No AI or language model is involved in any step.