Format Markdown Tables: What Formatting Changes, What It Preserves, and When Plain Text Is Better

A practical review of creating and formatting Markdown tables: what the syntax and alignment changes actually do, how tables behave when copied or shared, and when plain text is a better choice.

Formatting a Markdown table can mean two different things: writing the pipe-and-hyphen syntax that a renderer turns into a table, or tidying that source so the columns line up when you read it as plain text. Both are useful, but they change different things. This review explains each, where a Markdown table holds up after copying or sharing, and when a plain-text layout is the safer choice.

Short answer: is a Markdown table right for your use?

A Markdown table is a good fit when the content is genuinely tabular (rows of comparable items with shared attributes), the cells are short, and the destination renders tables. In that case you get a real table in the output, with header cells, from source that stays readable in a text editor. The decisive tradeoff is that tables are not part of core CommonMark; they come from extensions such as GitHub Flavored Markdown (GFM). Where the extension isn't supported, readers see raw pipes and hyphens instead of a table.

Plain text, or a short list, is usually preferable when the destination does not render Markdown tables, when cells need paragraphs, lists or other block content, when the table is wider than a typical screen, when you need merged cells, or when the information is really a sequence of steps rather than a grid.

How to create a table in Markdown

In GFM-style syntax, a table needs a header row, a delimiter row directly beneath it, and zero or more body rows. Cells are separated by pipe characters. The delimiter row contains only hyphens, optionally with colons that set column alignment.

| Item    | Format | Notes            |
|:--------|:------:|-----------------:|
| Report  | PDF    | Final version    |
| Dataset | CSV    | Updated weekly   |

In this example, the colon on the left of the first delimiter cell requests left alignment, colons on both sides center the second column, and a colon on the right right-aligns the third. Leading and trailing pipes are optional in GFM, but including them makes the structure easier to see and is widely accepted. Using three or more hyphens per delimiter cell is a common convention that avoids ambiguity across implementations.

  • The delimiter row must have the same number of cells as the header row, or GFM will not recognize the block as a table.
  • In GFM, body rows with fewer cells are padded with empty cells, and extra cells are ignored.
  • A literal pipe inside a cell must be escaped as | so it is not read as a column separator, including inside inline code in GFM.
  • Cells hold inline content only: emphasis, links and inline code work, but headings, lists and fenced code blocks do not.
  • Each row must stay on a single source line; there is no native multi-line cell. Some renderers accept an HTML line break inside a cell, but that depends on whether HTML is allowed.
  • There is no native syntax for merged cells (column or row spans).

What formatting a Markdown table actually changes

"Formatting" a table usually means padding cells with spaces and lengthening delimiter hyphens so every pipe lines up vertically in the source. This is a change to the stored characters, but only to whitespace and delimiter length. A conforming renderer ignores that padding, so the rendered table is the same whether the source is aligned or ragged. The benefit is readability for people editing the raw file, not for people viewing the rendered output.

Alignment colons are different: they do affect presentation. They tell the renderer how to align text within each column, which typically shows up as alignment styling on the output cells. They do not change the cell content itself, and how visibly they appear depends on the renderer and any stylesheet applied.

Formatting tools may also make other edits, such as normalizing the delimiter row, adding missing leading or trailing pipes, trimming trailing whitespace, or escaping characters. These are generally meant to preserve meaning, but because behavior differs between tools, it is worth reviewing the diff after running any formatter rather than assuming the content is untouched. No specific formatting tool was evaluated for this article.

Aligned source has practical costs

  • Version control diffs get noisy: lengthening one cell can force every row in that column to be re-padded, so a one-word edit appears as a change to the whole table.
  • Maintaining alignment by hand is tedious, which is the main reason people use editor plugins or formatters.
  • Visual alignment assumes a monospace font. Characters that many terminals and editors display at double width, such as many CJK characters and emoji, can throw off column alignment unless the formatter accounts for display width. This affects only the source view, not the rendered table.

Will the table stay readable after copying or sharing?

It depends on whether you share the source or the rendered result, and on what the destination supports. The points below describe general behavior; no destination-specific tests were performed for this review, so check the specific platform you plan to use.

What you share | Where it goes | Likely result
Markdown source | A renderer with GFM-style table support | Displays as a table
Markdown source | A CommonMark-only renderer or a plain-text field | Raw pipes and hyphens appear as literal text
Aligned Markdown source | A plain-text view in a monospace font | Readable as a grid of columns
Aligned Markdown source | A plain-text view in a proportional font | Columns drift out of alignment, though the pipes still separate cells
Rendered table copied from a page | Email, document or spreadsheet | Varies by application; it may paste as a table, as tab-separated text, or lose structure

If you are not sure the destination renders tables, aligned source is the more resilient form to share: even unrendered, it remains understandable in a monospace context. When the recipient will see a proportional font and no rendering, a short list or labeled lines are often clearer than a table.

Accessibility considerations

When a renderer converts a Markdown table to an HTML table and marks the header row as header cells (as the GFM specification describes), assistive technology such as screen readers can use those headers to announce which column a cell belongs to. That structure is a real advantage over a grid faked with spaces. Support for table navigation varies between screen readers and browsers, and this review did not test any particular combination.

  • Give every column a meaningful header; empty or vague headers remove the context that makes tables navigable.
  • Use a table only for data, not to arrange content side by side for layout.
  • Add a sentence before the table saying what it shows, so readers know what to expect before navigating cells.
  • Keep cells short; long prose inside cells is hard to follow when read cell by cell.
  • Avoid relying on alignment alone to convey meaning.
  • Raw, unrendered Markdown read aloud tends to include the pipes and hyphens, which is noisy. If the table may reach readers unrendered, provide a plain-text summary or list alongside it.

Editing and search

For editing, Markdown tables are easy to change for small grids and become awkward as they grow wide or long, since every row is a single line and cells cannot contain block content. Text inside a rendered table is ordinary text in the output, so it remains selectable and available to search within the page; this review makes no claim about how any particular search engine weighs table content.

When to use plain text instead

  • The destination does not support Markdown tables and you cannot control the font.
  • Cells need multiple paragraphs, lists or code blocks.
  • The table would have many columns, causing horizontal scrolling or wrapping on small screens.
  • The content needs merged cells or nested structure.
  • The information is a sequence or a set of definitions that reads naturally as a list.
  • The text will be read primarily as raw source by assistive technology.

Gaps in this review

This review is based on documented Markdown syntax and general rendering principles. It does not include hands-on tests of specific formatters, editors, chat or email platforms, or screen readers, and it makes no claims about the privacy or data handling of any online table formatter. Before relying on a table in a particular destination, preview it there and check how it copies and how it reads with the assistive technology your audience uses.