Markdown to Word with tables

Pipe tables become real Word tables: a repeating header row, per-column alignment, estimated column widths and bold or code inside cells. Editable, sortable, never a screenshot.

Free · no sign-up

Benchmark results

TestCommandRunsMedian (ms)Result
Cold startapp --boot20412.5pass
Warm startapp --boot --cache2088.1pass
Large importapp import big.csv59,340.0slow
Exportapp export --pdf101,205.7pass

Left, centre and right alignment come from the colons in the separator row.

IDRegionQ1Q2Q3Q4YoYOwnerNotes
101EMEA1.21.41.51.9+18%Reyeson track
102APAC0.80.91.11.3+22%Okafornew hires
Converted in your browser. Your file never leaves your device.
1

Paste a pipe table

GitHub-style tables with a header row and a separator row. Colons in the separator set alignment.

2

Check widths and alignment

The preview uses the same column-width estimate as the .docx, so a table that fits here fits in Word.

3

Download and keep editing

Add rows, sort a column, apply a table style from Word's Design tab. It is a native table.

How a Markdown table becomes a real Word table

Word stores a table as a w:tbl element with a grid of column widths, a list of rows, and cells that each hold one or more paragraphs. Nothing about that structure is a picture, which is why you can click into a cell, press Tab to move to the next one, sort by a column, or convert the whole thing to text. Converters that render tables as images, or that paste tab-separated text, lose all of that. MDtoDOCX writes the native structure, and the sections below explain each decision that goes into it.

Header row: shaded and repeating

The first row of a pipe table is the header. It is written with the w:tblHeader property, which tells Word to repeat that row at the top of every page when the table breaks across pages, a detail that matters for the forty-row benchmark tables people paste from CI output. Header cells are shaded light grey with bold text, the same look Word's own Table Grid style with a header gives, so the table does not look foreign next to tables made in Word.

Alignment from the separator row

Colons in the separator row set alignment per column: :--- left, :---: centre, ---: right. Each cell's paragraph receives the matching w:jc value. Right-aligning numeric columns is worth doing in the Markdown because Word cannot infer it later without selecting the column by hand. Columns with no colon default to left, as in GitHub.

Column widths are estimated, not equal

A naive converter gives every column the same width, which is why a table with an ID column and a Notes column looks wrong. MDtoDOCX measures the content of each column, taking the longest cell in characters with a cap so one long note does not dominate, and distributes the printable page width in proportion, with a minimum width so short columns remain readable. The widths are written into the table grid and the layout is set to fixed, so Word does not re-flow them on open. You can still drag any border in Word to adjust. Tables with eight or more columns automatically drop the font size to 9 points, and the Pro option places them in a landscape section so the page turns sideways for that table only.

Inline formatting inside cells

Every inline construct described on the formatting page works inside a cell: bold, italics, strikethrough, links, and inline code in Consolas with shading. Multi-line cells are written with <br> in the Markdown and become line breaks in the cell paragraph. An escaped pipe \| is a literal vertical bar. Images inside cells are scaled to the cell width, and inline formulas follow the rules on Markdown to Word with formulas. Empty cells are written as empty paragraphs so the grid stays intact.

Table style, borders and what is not possible

The table references the built-in Table Grid style and adds thin borders on every cell. Because it is a styled table, Word's Design tab offers every banded and coloured style and applying one restyles the whole table at once. When a .docx template is loaded, the template's default table style is used instead. GitHub Flavored Markdown has no syntax for merged cells, column spans or footers, so a table that needs them has to be merged in Word after export; Word's Merge Cells works normally because the cells are real. Tables are free with no row or column limit within the general 2 MB cap, and the same table engine is used for Pandoc-style pipe tables with relative widths in the dashes.

Tables in Word: MDtoDOCX vs Pandoc vs copy-paste

Table featureMDtoDOCXPandocCopy from a preview
Native, editable Word tableYesYesUsually, but often breaks on nested formatting
Header repeats across pagesYes, tblHeaderYesNo
Header shadingYesOnly with a reference docBrowser styles, inconsistent
Column alignment from colonsYesYesSometimes
Column widthsEstimated from contentEqual unless dashes encode widthsBrowser widths
Inline code in cellsConsolas with shadingVerbatim styleFont often lost
Wide tablesSmaller font, landscape optionOverflowOverflow
InstallNonePandocNone

Frequently asked questions

Is the table a real Word table or an image?
A real table. It is written as native table structure with rows, cells and a column grid, so you can edit cells, add rows, sort and apply table styles in Word.
How is column alignment set?
From the colons in the Markdown separator row. A colon on the left means left-aligned, on both sides centred, on the right right-aligned. Each cell paragraph gets the matching alignment.
How are column widths decided?
Content is measured per column and the printable width is shared proportionally with a minimum width per column. The layout is fixed so Word keeps the widths, and you can drag borders to adjust.
Does the header row repeat on the next page?
Yes. The first row is marked as a header row so Word repeats it at the top of each page the table spans.
Can I have bold text or code inside a cell?
Yes. All inline formatting works inside cells, including bold, italics, strikethrough, links and inline code with monospace shading.
Can cells be merged?
Markdown has no syntax for merged cells, so they are not created automatically. Because the table is native, you can select cells in Word and use Merge Cells after export.
What happens to very wide tables?
Tables with eight or more columns use a 9-point font to fit. Pro can place them in a landscape section so only those pages turn sideways.
How do I put a line break inside a cell?
Use the HTML br tag inside the cell. It becomes a line break within the cell paragraph.
Is table conversion free?
Yes. Tables with any number of rows and columns are part of the free converter. Only the landscape option for wide tables is Pro.