Parser reliability

Common Markdown Table Problems and How to Fix Them

Written and reviewed by the md2text maintainer. Parser-specific guidance is checked against the automated regression suite.

Markdown tables usually break in predictable ways. A row has too many cells, a pipe appears inside inline code, the separator row is missing, or a long sentence makes the table impossible to scan. These problems are small in the source file, but they become obvious when the table is converted to plain text.

This guide walks through the common issues and the simplest fixes.

Problem: columns shift unexpectedly

Shifted columns usually mean one row has a different number of cells than the header.

| Name | Role | Status |
|---|---|---|
| Alex | Maintainer | Ready |
| Sam | Review |

The second body row only has two cells. Add the missing value, even if it is blank:

| Name | Role | Status |
|---|---|---|
| Alex | Maintainer | Ready |
| Sam | Review | Pending |

For plain-text output, consistent column counts are especially important. The converter can fill missing cells, but the table will be more meaningful when the source is explicit.

Problem: a pipe inside a cell creates a new column

The pipe character separates columns. If you need a literal pipe inside a cell, escape it:

| Pattern | Meaning |
|---|---|
| `success \| warning` | Match either state |

Without the backslash, the parser may treat success and warning as separate cells. This is common in documentation for regular expressions, shell commands, and union types.

Problem: the separator row is not valid

The separator row should contain dashes and optional colons:

| Field | Type |
|---|---|
| email | string |

This is not a table separator:

| Field | Type |
| === | === |
| email | string |

Some tools are forgiving, but you should not rely on that. A clean separator row makes the table easier to detect and convert.

Problem: long cells make the output unreadable

Tables are poor containers for long prose. This source table is technically possible, but hard to read:

| Setting | Description |
|---|---|
| `strict` | When enabled, the parser rejects rows that have missing cells, extra cells, or separator rows that do not match the expected Markdown table shape. |

Try a shorter table plus a paragraph:

| Setting | Default | Purpose |
|---|---:|---|
| `strict` | `true` | Reject malformed rows |

Then explain the details below the table. The table becomes a summary, and the prose carries the nuance.

Problem: the table looks aligned in Markdown but not after pasting

Plain-text tables depend on the destination. If you paste an aligned table into a proportional font, the spacing can look wrong even when the output is correct.

Fixes:

DestinationSuggested fix
GitHub issueWrap the output in a fenced text code block
EmailUse plain-text mode or a monospaced formatting option
Source commentKeep line length modest
Support toolPreview the reply before sending

When in doubt, use ASCII grid output. It gives the reader more visual boundaries if the destination makes spacing imperfect.

A link such as [Deployment guide](/docs/deploy) may be converted to Deployment guide (/docs/deploy). This is more readable than raw Markdown, but it can widen the column.

If a table has many links, consider using short labels:

| Topic | Reference |
|---|---|
| Deploy | [Guide](/docs/deploy) |
| Configure | [Options](/docs/config) |

You can also move references below the table when URLs are long.

Problem: mixed Markdown content is pasted with the table

Many documents contain headings, paragraphs, and tables together. That is fine, but make sure the table block is separated by blank lines:

## Browser support

| Browser | Support |
|---|---|
| Chrome | Full |
| Safari | Requires 16.4 |

Clear spacing helps both human readers and conversion logic.

A quick cleanup workflow

Before converting a table, run through this sequence:

  1. Count header cells and body cells.
  2. Confirm the separator row uses dashes and optional colons.
  3. Escape literal pipes inside cells.
  4. Shorten long cells.
  5. Choose alignment for numeric and status columns.
  6. Convert to text and preview it in the final destination.

Most table problems are fixed before the converter runs. Clean Markdown produces clean plain text.

Convert your own table

Paste a Markdown table into the converter and choose ASCII grid, Unicode box, or Simple text output. Conversion runs locally in your browser.

Convert a Markdown table