Skip to content

Markdown Table Cleaner

Clean a messy Markdown table: remove blank and duplicate rows, trim spaces, strip HTML and hidden characters.

Row
1
2
3
4
5
6
7
8
Output
|   Employee ID   | Full Name         | Role / Permissions         |                   Status                   | Department |
| :-------------- | :---------------- | :------------------------- | :----------------------------------------: | :--------- |
| USR-101         |   Sarah Jenkins   | Lead Engineer \| Architect |  <span style="color:green">Active</span>   | Core Infra |
| USR-102         | Marcus Vance      | Product Designer           |                   Active                   | Product    |
|                 |                   |                            |                                            |            |
| USR-103         | Amina Patel       | Security Analyst \| Audit  |  <span style="color:green">Active</span>   | InfoSec    |
| USR-102         | Marcus Vance      | Product Designer           |                   Active                   | Product    |
| USR-104         | Liam O'Connor     | Frontend Specialist        |                  On Leave                  |            |
| USR-105         | Chen Wei          | Database Admin \| DBA      | <span style="color:blue">Contractor</span> | Data Ops   |
|                 |                   |                            |                                            |            |
8 rows × 5 columns
Rendered Preview
Employee ID Full NameRole / PermissionsStatusDepartment
USR-101 Sarah Jenkins Lead Engineer | Architect<span style="color:green">Active</span>Core Infra
USR-102Marcus VanceProduct DesignerActiveProduct
USR-103Amina PatelSecurity Analyst | Audit<span style="color:green">Active</span>InfoSec
USR-102Marcus VanceProduct DesignerActiveProduct
USR-104Liam O'ConnorFrontend SpecialistOn Leave—
USR-105Chen WeiDatabase Admin | DBA<span style="color:blue">Contractor</span>Data Ops
— ——

How to clean up a Markdown table in 3 steps

  1. 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.

  2. 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.

  3. 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

Before: blank row, duplicate, HTML, &nbsp;, hidden U+200B
| 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&nbsp;leave | |
After Deep clean
| 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 &amp;, &nbsp; 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.
Browse all 36 tools

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.