Markdown Table Cleaner
Free · No sign-up · Nothing uploaded
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.
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.
How to Use
- 1 Copy the Markdown that contains one or more pipe tables.
- 2 Paste it into the Input box above.
- 3 Click Clean Tables and check the live preview below the button.
- 4 Click Copy to copy the cleaned Markdown.
Common Uses
- Fixing a table copied from an AI chat before pasting it into a README or wiki
- Re-aligning columns after editing cell content by hand
- Adding missing outer pipes and separator rows to a hand-typed table
- Tidying tables in GitHub issues, pull requests, and docs before submitting
- Checking a table renders correctly with the preview before pasting it back
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 Clean Tables button 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 Clean Tables button 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.
Related Tools
Working with more than tables?
The Markdown Paste Cleaner removes Markdown formatting entirely when you want plain prose instead of a table, and the Text Diff Checker shows exactly what changed between two versions of a table. Browse all tools →