Markdown Table Cleaner
Clean a messy Markdown table: remove blank and duplicate rows, trim spaces, strip HTML and hidden characters.
Paste cells from Excel or Google Sheets into the first header to replace the table · Tab / Enter / arrows move · Shift+F10 opens row & column actions
How to clean up a Markdown table in 3 steps
Paste the messy table
Press Ctrl+V (⌘V) anywhere on the page outside a text box, or use the Markdown or Import tab. Tables copied from web pages, docs and exports all work.
Run Deep clean or pick rules
Deep clean applies every safe fix at once. For control, open Options, tick the rules you want and click Apply Selected Rules. Find replaces text across the table.
Check the receipt and copy
The audit receipt lists what changed (rows removed, tags stripped, characters purged). Undo with Ctrl/⌘+Z or Restore Original, then copy the Markdown.
Example
| Employee ID | Name | Status | | |---|---|---|---| | USR-101 | Sarah Jenkins | <span style="color:green">Active</span> | | | | | | | | USR-102 | Marcus Vance | Active | | | USR-102 | Marcus Vance | Active | | | USR-103 | Amina Patel | On leave | |
| Employee ID | Name | Status | | ----------- | ------------- | -------- | | USR-101 | Sarah Jenkins | Active | | USR-102 | Marcus Vance | Active | | USR-103 | Amina Patel | On leave |
Options explained
- Deep clean
- Trims and collapses whitespace, removes invisible characters, empty rows, blank columns and duplicate rows, strips HTML tags (keeping <br>), decodes entities and escapes pipes.
- Find
- Replaces text across the whole table or in one column, with optional case matching and regular expressions.Entire table or one column · Match Case · Regex Pattern · Replace All
- Quick presets
- Single-purpose fixes from the Options panel.Strip HTML & Styles · Escape Cell Pipes (\|) · Fill Blanks with “—” · Title Case Headers
- Prune Empty Rows
- Removes rows where every cell is empty or whitespace.On by default
- Prune Blank Cols
- Removes columns that have no header text and no data. A column with a header is kept even when its cells are empty.Off by default
- Deduplicate Rows
- Keeps the first of any rows whose cells are identical (compared after trimming, if Trim is on).Off by default
- Trim / Collapse whitespace
- Trim removes spaces at the start and end of each cell; Collapse Multi-Spaces turns runs of spaces into one.Both on by default
- Purge Invisible
- Removes zero-width spaces (U+200B), zero-width joiners and non-joiners (U+200D, U+200C) and byte-order marks (U+FEFF). They are invisible but break matching, sorting and alignment.On by default
- Strip HTML Tags / Decode Entities
- Strip removes tags such as <span style="…"> and keeps their text (and <br> line breaks). Decode turns &, and similar entities into characters.Strip off by default · Decode on by default
- Escape Cell Pipes
- Writes literal pipes in cells as \| so they cannot split columns.On by default
- Fill Blanks
- Puts a placeholder in empty cells so readers can tell “no value” from a missing cell.Leave Empty · — · - · N/A · None · 0
- Restore Original
- Returns to the table as it was before cleaning.
Related tools
Also useful
Next steps
- Markdown Table FormatterAlign columns and pad cells so the raw table is readable.
- Markdown Table ValidatorFind broken delimiter rows, column mismatches and unescaped pipes.
- Markdown Table SorterSort rows alphabetically or numerically by any column.
- Markdown Table TransposeSwap rows and columns.
- Markdown Table EditorPaste an existing Markdown table and edit cells visually.
Convert Markdown to…
- Markdown Table to CSVExport a Markdown table as RFC 4180 CSV.
- Markdown Table to TSVCopy as tab-separated values that paste cleanly into Excel and Sheets.
- Markdown Table to HTMLExport semantic <table> markup.
- Markdown Table to JSONExport rows as an array of JSON objects.
- Markdown Table to LaTeXExport LaTeX tabular code for papers and Overleaf.
Convert to Markdown from…
- CSV to Markdown TableConvert CSV text or .csv files, including quoted cells.
- Excel to Markdown TablePaste cells copied from Excel straight into a Markdown table.
- Google Sheets to Markdown TablePaste a copied range or a public sheet URL.
- TSV to Markdown TableConvert tab-separated text into a Markdown table.
- HTML Table to MarkdownConvert <table> markup into a Markdown table.
About this tool
Tables copied from web pages, Google Docs, CMS exports or chat apps bring junk with them: blank filler rows, repeated rows, double spaces, <span style> tags and zero-width characters you cannot see but that break sorting and diffs. The cleaner removes all of it in one pass and shows a receipt of what changed, or lets you pick exactly which rules to apply.
- One-click Deep clean with an audit receipt of every change
- Removes empty rows, blank columns and duplicate rows
- Trims and collapses whitespace in every cell
- Strips HTML tags and inline styles, keeping <br>
- Purges zero-width spaces and other invisible characters
- Find and replace with regex, per column or table-wide
- Fills blank cells with —, N/A, None or 0
Technical details
What gets cleaned, and what is left alone
Tables copied from web pages, Google Docs, Slack or CMS exports often carry invisible characters, inline styles and blank filler rows that look fine but break sorting, diffs and exports. The cleaner works on cell text only; it does not reorder rows or change alignment.
- Invisible characters: U+200B, U+200C, U+200D and U+FEFF are removed; they often arrive with text copied from chat apps, PDFs and word processors.
- HTML: Tags are removed and their text kept, so <span style="color:green">Active</span> becomes Active. <br> is kept because it is how Markdown cells hold line breaks.
- Duplicates: Rows are compared cell by cell after trimming; the first occurrence stays and the order of the rest is unchanged.
- Columns: Only columns with an empty header and no data are removed, so a header you added on purpose is never deleted.
- Undo: Every clean is one undo step (Ctrl/⌘+Z).
Common problems and fixes
A row I needed was removed as a duplicate
Cause: Deep clean deduplicates, and with trimming on, rows that differ only by leading or trailing spaces count as the same.
Fix: Press Ctrl/⌘+Z, then open Options, untick Deduplicate Rows and click Apply Selected Rules.
Colors and highlights disappeared
Cause: Strip HTML removes every tag except <br>, including <span style>, <sub>, <kbd> and <img>. GitHub strips style attributes anyway, so colors would not have shown there.
Fix: If your renderer supports inline HTML colors, untick Strip HTML Tags and apply the other rules.
An empty column was not removed
Cause: The column has a header, so it is kept.
Fix: Delete it from the column’s ▾ menu in the grid, or clear the header text and clean again.
Frequently asked questions
How do I remove empty rows from a Markdown table?
Paste the table and click Deep clean, or open Options and keep Prune Empty Rows ticked, then click Apply Selected Rules. Rows whose cells are all empty or only spaces are removed.
How do I remove duplicate rows?
Deep clean removes rows that are identical to an earlier row, keeping the first one. To run it alone, open Options, tick only Deduplicate Rows and click Apply Selected Rules.
How do I strip HTML tags and inline styles from table cells?
Click Strip HTML & Styles in Options (or Deep clean). Tags are removed and their text kept, so <span style="color:red">Late</span> becomes Late. <br> is kept so multi-line cells stay multi-line.
What are invisible characters and why remove them?
Zero-width spaces (U+200B), zero-width joiners and byte-order marks take up no space on screen but are real characters. They make identical-looking values differ, break sorting and search, and can shift alignment. They are common in text copied from Slack, Google Docs and PDFs.
Does cleaning change bold text, links or code?
No. Markdown formatting such as **bold**, `code` and [links](https://example.com) is plain text to the cleaner and is kept. Only HTML tags are removed, and only when Strip HTML is on.
Can I undo a clean?
Yes. Each clean is a single undo step (Ctrl+Z or ⌘Z), and Restore Original in Options brings back the table as it was before any cleaning.
Can I replace text in one column only?
Yes. Click Find, choose the column, enter the text or a regular expression and click Replace All. The count of replaced occurrences is shown.
Is my table uploaded?
No. Cleaning runs in your browser and the table is not sent to a server.