Type red | green into a cell of a hand-written Markdown table and the row loses its last cell. We tried it: “green” moved into the Price column and the price, 12, vanished from the table. A line break typed inside a cell is worse, since it ends the row there and the rest of the cell becomes a new row of its own. Spreadsheet cells carry both, and both need changing on the way into Markdown.
A table built to break things
On 24 September 2026 we made a nine-row table whose Notes column held a pipe, a line break, quotation marks, a comma, a tab, spaces at both ends and an empty cell. We saved it as CSV and as tab-separated text with Python’s csv module, using its Excel settings, which the Python documentation says match an Excel-generated file. In that format a cell holding a separator, a quotation mark or a line break is wrapped in quotes. Each file went through our CSV to Markdown table tool in Chromium 153, then was shown as HTML with the same GitHub rules our other Markdown tools use, and turned back into plain text with Markdown to text.
| In the cell | In the Markdown | Shown as a table | As plain text |
|---|---|---|---|
| red | green | red \| green | One cell, pipe shown | One cell |
| A line break | first line<br>second line | One cell on two lines | One cell, the break becomes a space (fixed) |
| the "best" one | As it was | As it was | As it was |
| one, two | As it was | As it was | As it was |
| A tab | A tab | A space | A space |
| Spaces at both ends | Trimmed | Trimmed | Trimmed |
| Empty | An empty cell | An empty cell | Two tabs in a row |
Every row came out with its three cells. A pipe is written as \|, which the GitHub Markdown rules show as a plain pipe, and a line break as <br>, which GitHub and most Markdown viewers show as a new line. Quotation marks come through as they are once the CSV quoting around them is undone.
Two bugs on the way back out
Markdown to text turns a table into one line per row with tabs between cells, so it pastes back into a spreadsheet. Our test caught it breaking that promise: the <br> in the line-break cell became a real line break, so nine rows came out as ten lines and would have pasted as ten rows. The cell now keeps its two lines as one, joined by a space.
The second was a file split by semicolons, the layout used where the comma is the decimal mark. Our tool guesses the separator from the first line, and a header of Produkt;Preis, EUR has one of each. The comma won, so the prices were cut at their decimal commas and “Papier;4” sat in the first column. A tie now goes to the semicolon. Both fixes have tests in our test suite.
One thing already worked: some spreadsheet exports start with an invisible byte order mark, and opening such a file in the tool left no stray character in the first header cell.
What Markdown to text keeps from a real README
We also ran the README of the bat command-line tool through Markdown to text, the same file we printed in our Markdown to PDF test. It went from 33,910 characters to 27,768 in 24 milliseconds.
- The 83 links kept their words and lost their addresses.
- The 8 pictures left their descriptions, such as “Git integration example”.
- Its 2 tables, 14 rows in all, became 14 tab-separated lines.
- The 58 code blocks stayed as they were. All 78 asterisks, hashes, underscores and backticks left in the text are code: 54 in those blocks and 24 in bits of code inside sentences, such as
#!/bin/sh.
If you need the addresses, convert to HTML with Markdown to HTML instead; plain text has nowhere to put a link.
For a table you will print, our Markdown to PDF tool repeats its header row on every page; for one going the other way, from a web page into Markdown, see what survives a web page.