How to fix misaligned and broken markdown pipe tables
- Step 1Paste or upload the Markdown — Paste the document into the editor, or switch to upload and drop a
.md,.mdx,.markdown, or.txtfile. The whole document is processed at once, so multiple tables in one file are all repaired in a single run. - Step 2Confirm the first row is your real header — The tool treats the first pipe line of each table run as the header and builds the separator from it. If a previous edit left the header missing, the first surviving body row will be promoted to header — fix the source order before running if that is not what you want.
- Step 3Run the repair — Click run. There are no checkboxes, presets, or alignment controls — the transform is fixed. Every table gets a regenerated separator and column-matched rows in one pass.
- Step 4Check the rebuilt separator — The output separator is always plain
---. If the original table used:---:centring or---:right-alignment, those are gone — re-add them by hand in the output if you need column alignment back. - Step 5Preview the rendered result — Toggle the preview to see the repaired table rendered, or paste the output into GitHub, VS Code, or any GFM previewer to confirm it now displays as a real table.
- Step 6Copy or download — Copy the Markdown to the clipboard or download it as a file, then commit it over the broken original. The output filename mirrors the input filename when you uploaded a file.
What the repair does to each line type
The tool classifies every line by a single rule — does it contain a pipe and is it non-empty — then acts. Behavior verified against the repair function.
| Line in the source | How the tool classifies it | What the output contains |
|---|---|---|
| First pipe line of a table run | Header | Rewritten as | cell | cell | plus a fresh | --- | --- | separator on the next line |
| A later pipe line that is only dashes / colons / pipes | Old separator row | Dropped — the tool generates its own separator from the header |
| A later pipe line with content | Body row | Split on |, then padded with empty cells or trimmed to the header's column count |
| A line with no pipe (or an empty line) | End of table / prose | Passed through unchanged; the next pipe line starts a new table |
Anything inside ``triple backticks | Fenced code | Passed through byte-for-byte; never parsed as a table |
Column-count repair, by case
Body rows are forced to the header's cell count. Header has 3 columns in every example below.
| Body row as written | Cells found | Result row |
|---|---|---|
| Alice | 30 | | 2 (one short) | | Alice | 30 | | — empty 3rd cell appended |
| Bob | 25 | NYC | | 3 (exact) | | Bob | 25 | NYC | — unchanged |
| Carl | 40 | LA | extra | | 4 (one over) | | Carl | 40 | LA | — 4th cell dropped |
|| | 1 empty cell | | | | | — three empty cells |
Tier limits for Markdown Table Repair
Markdown-family limits. The character limit is separate from byte size — a doc with many wide tables can hit the char limit before the file-size limit.
| Tier | Max file size | Max characters | Files per run |
|---|---|---|---|
| Free | 1 MB | 500,000 | 1 |
| Pro | 10 MB | 5,000,000 | 10 |
| Pro-media | 50 MB | 20,000,000 | 50 |
| Developer | 500 MB | Unlimited | Unlimited |
Cookbook
Real before/after Markdown from docs that wouldn't render. Each block shows the broken source on top and the tool's exact output below.
Table with no separator row
The single most common breakage — a header and rows but no | --- | line, so GFM renders the whole thing as plain text. The tool injects the separator under the header.
Before: | Feature | Status | | Login | Done | | Export | WIP | After: | Feature | Status | | --- | --- | | Login | Done | | Export | WIP |
Body row missing a column
An edit added a column to the header but one body row was never updated. The short row gets an empty trailing cell so column counts match.
Before: | Name | Role | Team | | --- | --- | --- | | Ada | Lead | | Bo | Dev | Core | After: | Name | Role | Team | | --- | --- | --- | | Ada | Lead | | | Bo | Dev | Core |
Duplicate / stray separator rows removed
A merge or paste left two separator lines. The tool regenerates exactly one separator from the header and drops the extras.
Before: | A | B | | --- | --- | | --- | --- | | 1 | 2 | After: | A | B | | --- | --- | | 1 | 2 |
Alignment markers are not preserved
A centred/right-aligned table loses its alignment — the rebuilt separator is always plain ---. Re-add :---: by hand if you need it.
Before: | Item | Price | |:---|---:| | Pen | 2.00 | After: | Item | Price | | --- | --- | | Pen | 2.00 |
Two tables in one document
Every table in the file is repaired in a single run. A blank line (or any pipe-free line) ends one table and the next pipe line starts a new one.
Before: | X | Y | | 1 | 2 | | Q | R | | a | b | After: | X | Y | | --- | --- | | 1 | 2 | | Q | R | | --- | --- | | a | b |
Edge cases and what actually happens
Table has no header — first body row is promoted
By designThe tool always treats the first pipe line of a run as the header. If the real header was deleted, your first data row becomes the header and gets a separator under it. Restore the header line in the source before running if the data must stay as data.
Alignment hints (`:---:`, `---:`)
Not preservedThe separator is regenerated as plain --- for every column. Centring and right-alignment markers from the original separator are discarded. This is intentional in the algorithm — re-apply alignment by editing the output separator after repair.
Excess columns in a body row
TrimmedA body row with more cells than the header has its extra trailing cells dropped to match the header width. If the extra cell held real data, the data is lost — widen the header first if every column matters.
A prose line that contains a pipe
Misread as a tableAny non-empty line with a | is treated as a table row. A sentence like Use a | b syntax becomes a one-row table with a separator. Wrap such lines in backticks or a code fence before running so the pipe is protected.
Pipe inside a code-span or escaped `\|`
Not protectedCells are split on every | with no escaping awareness. A cell like ` a \| b ` is split into two cells and the surplus is trimmed, breaking the code span. The tool only protects pipes inside fenced (triple-backtick) blocks, not inline code spans.
Fenced code block containing a table
PreservedA pipe table shown as an example inside triple backticks is detected as a code fence and passed through unchanged. It is never given a separator or column-padded.
HTML `<table>` markup in the source
Passed throughThe repair only acts on pipe lines. Raw <table>/<tr>/<td> HTML has no leading pipes, so it is left exactly as written. Use a converter if you need it turned into pipe Markdown.
Cell content with intentional empty cells
PreservedEmpty cells you wrote on purpose stay empty and render as blank table cells — that is valid GFM. The tool only adds cells to reach the header width; it never removes a cell you already filled in (except trailing overflow).
Document over your tier's char limit
RejectedFree is capped at 500,000 characters and 1 MB. A doc full of wide tables can pass the byte check but exceed the character limit — split the file or upgrade the tier to process it in one run.
Frequently asked questions
What exactly counts as a 'broken' table here?
A table that is missing its | --- | separator row, has body rows whose column count differs from the header, or carries duplicate/stray separator lines. The tool rebuilds the separator and forces every body row to the header's column count in one pass.
Does it change my cell data?
Cell text is preserved exactly, with two structural exceptions: short rows gain empty trailing cells, and rows with more cells than the header have the overflow cells dropped. No values inside the kept cells are edited.
Will my column alignment (`:---:`) survive?
No. The rebuilt separator is always plain ---. Alignment hints from the original are not carried over. If you need centred or right-aligned columns, re-add the markers to the output separator after running.
How are tables detected?
Any non-empty line containing a | starts or continues a table; the first such line becomes the header. A line with no pipe (including a blank line) ends the current table. There is no smarter heuristic, so a prose sentence with a pipe will be misread as a table.
Can I repair tables with merged cells?
GFM pipe tables have no native merged-cell syntax, so there is nothing to repair — merged cells only exist in HTML tables, which this tool passes through untouched. Keep merges in raw HTML if you need them.
Are there any options or presets to configure?
No. This tool has a fixed transform and no settings — needsOptions is false in the registry. You paste, run, and copy. For configurable behavior (heading shifts, TOC position, etc.) those live on other markdown tools.
What happens to a pipe character inside a cell?
It is treated as a cell delimiter — the tool splits on every | with no escaping awareness, so \| and pipes inside inline code spans both break the cell. Only pipes inside triple-backtick fenced blocks are safe. Avoid literal pipes in cells, or fence the line.
Does it touch code blocks?
No. Fenced code blocks (triple backticks) are detected and passed through byte-for-byte, so a pipe table shown as a code example is never rewritten. Inline code spans, however, are treated as normal prose and not protected.
Can I repair many files at once?
This tool takes one Markdown input per run. To process several files, combine them first with the Markdown merger, repair the result here, then split again with the splitter if needed.
My table came from a spreadsheet, not Markdown — what now?
This tool repairs existing pipe tables; it does not convert other formats. For a spreadsheet paste, build the table with CSV to Markdown table; for an HTML table, use HTML to Markdown, then run the repair if anything still looks off.
Is anything uploaded to a server?
No. The repair runs entirely in your browser. The only thing stored server-side is a single usage counter for signed-in dashboard stats — never your document content.
What if I also have broken lists or general formatting issues?
This tool only fixes pipe tables. For broken bullet and numbered lists use the list fixer; for an overall tidy-up run the prettifier or check style with the linter.
Privacy first
All Markdown processing runs locally in your browser using JavaScript. No file is ever uploaded to JAD Apps servers — only metadata counters are saved for signed-in dashboard stats.