How to Paste AI Markdown Tables Into Word and Google Docs Without Broken Borders
Copying a table out of an AI chat gives you two different things at once, and which one your paste uses decides whether you get a real table or fifty pipe characters. In a test run on 2026-11-15, the chat app's Copy but
Copying a table out of an AI chat gives you two different things at once, and which one your paste uses decides whether you get a real table or fifty pipe characters.
In a test run on 2026-11-15, the chat app's Copy button followed by a normal paste in Google Docs produced a table object with 9 rows, 4 columns and 36 filled cells, and left 0 markdown characters behind. The same clipboard pasted as plain text produced no table at all and 50 pipes. On the Word side, Pandoc 3.9 produced real Heading 1, 2 and 3 styles and a 36-cell table in 1.59 seconds, but the file it wrote carries no cell grid lines and dropped every column alignment marker.
One Copy click puts two versions on the clipboard
The chat app renders the markdown you see, and its Copy button puts both the rendered version (as HTML) and the source version (as text) on the clipboard. The application you paste into then picks one.
| Clipboard format | What it holds | What a paste does with it |
|---|---|---|
| HTML | Rendered tags: heading elements, a table with rows and cells, bold and code spans | Google Docs built 1 table, 3 heading paragraphs and 7 bullet paragraphs; 0 markdown characters arrived |
| Plain text | The markdown source: hash marks, pipes, asterisks, backticks, one separator row of dashes | Google Docs inserted 34 plain paragraphs; 50 pipes, 2 asterisks, 8 backticks and 3 hash-marked lines arrived as characters |
The plain-text version is not a degraded copy of the answer. It is the answer exactly as the model wrote it, which is what you want when the next stop is another tool, and the wrong version when the next stop is a person reading a document.
The four paste paths, measured
| Path | What arrived | What did not |
|---|---|---|
| Copy button, then Ctrl+V in Google Docs | 3 heading paragraphs (2 at level 2, 1 at level 3), one 9Γ4 table with 36 of 36 cells filled, 7 bullet paragraphs at 2 levels, bold and monospace text | The code block: its fence and language label arrived as a plain "Python" line, and the code as monospace paragraphs |
| Copy button, then Ctrl+Shift+V in Google Docs | All 34 paragraphs of text, every word intact, 1,566 characters | 0 headings, 0 tables, 0 bullet objects, 0 bold runs; 50 pipes and 2 asterisks stayed in the text |
| Google Docs "Paste from Markdown" | Not measured: the command opened a dialog asking to install a Chrome extension | Alignment, footnotes and code blocks on that path |
| Pandoc GFM to DOCX | Heading 1 Γ1, Heading 2 Γ4, Heading 3 Γ1 as real styles, 9Γ4 table with 36 of 36 cells, 7 bold runs, 1 hyperlink, 1 footnote, 12 list paragraphs at 2 levels | Cell grid lines (the table style defines one rule under the header row), 0 aligned cells |
The rich paste is the only path that gave a real table with no cleanup. Pandoc is the only path that produced Word heading styles, a working hyperlink and a real footnote.
Turning on Markdown in Google Docs did not fix a plain paste
Google documents two different things and they are easy to conflate: typing markdown as you write, and converting markdown on paste. I tested the second with the first switched on.
- Tools β Preferences β Enable Markdown, confirmed on.
- Ctrl+Shift+V with the same markdown clipboard: 34 plain paragraphs again, 50 pipes, 2 asterisks, 8 backticks. Identical to the run with Markdown off.
- "Paste from Markdown" under the Edit menu and the right-click menu both opened a dialog titled "Turn on copy, cut and paste", asking for a Chrome extension.
So that result says more about this browser than about Google Docs. What a measured number does support is narrower: on this setup the setting alone did not change what a text-only paste produced.
The one-line Pandoc command
pandoc -f gfm -t docx -o report.docx report.md
On a 536-word markdown report with a 4-column table, a footnote and a link:
- 1 H1, 4 H2, 1 H3 in the source β Heading 1 Γ1, Heading 2 Γ4, Heading 3 Γ1 as Word paragraph styles an outline can read
- 4-column table, header row plus 8 data rows β 9 rows Γ 4 columns, 36 cells, 36 filled, header row marked to repeat across page breaks
- Alignment markers
:---and---:β 0 cells carry an alignment property - 1 link β 1 hyperlink relationship, not a pasted URL
- 1 footnote β 1 footnote in a real footnote part
The alignment loss is not the markdown's fault. Converted to HTML first, all 36 cells carried their alignment as an inline style, 18 left and 18 right; the property disappeared in the DOCX step. The border result is the same kind of fact: nothing in the file draws cell grid lines. Both are one minute of work in Word (select the table, apply All Borders), and if you convert the same documents often, set the look once in a reference document and pass it with --reference-doc.
Which path to use
| If you need | Use | Why, from the numbers |
|---|---|---|
| A table that looks right in Google Docs now | Copy button, then Ctrl+V | 36 of 36 cells and 3 heading styles arrived in one paste, with 0 markdown characters left |
| The AI's exact markdown, for another tool | Copy button, then Ctrl+Shift+V, or Copy as markdown | The source arrived unchanged: 1,566 characters including the 50 pipes a parser needs |
| A Word file with outline levels, a link and a footnote | pandoc -f gfm -t docx |
Heading 1β3 as real styles, 1 hyperlink, 1 footnote, 36 of 36 cells |
| A Word file you will not touch afterwards | Pandoc, plus a table style applied once | Borders and alignment are the two things the default output lacks |
The pattern is worth memorising: rich paste for people, plain paste for machines, a converter when the destination is a file.
The full guide, with the test conditions, the sample sizes and the document-API counts behind every number above, is on my blog: Read the full guide and test benchmarks on Charrette AI Room.
Originally published at https://c-roomm.blogspot.com/2026/11/paste-ai-markdown-tables-word-google-docs.html
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.