Convert a Table to CSV, Markdown, or HTML Text
Turn tables in Google Docs™, Slides™, and Sheets™ into CSV, Markdown, or HTML text. Insert it below the table, copy it, or download it as a file.
Table to Text turns a table back into text in Google Docs™, Google Slides™, and Google Sheets™. Choose CSV for spreadsheets and data imports, Markdown for README files, wikis, and chat tools, or HTML for web pages and email templates.
By default the text is inserted below the table. You can copy it to the clipboard or download it as a .csv, .md, or .html file instead.
On this pageConvert a table to text
Convert a table to text
CSV is the default format. Each row becomes one line, and the columns are separated by commas.
- Place the cursor inside the table, or select the whole table. You can also select several tables.
- In the sidebar, open Tables & Convert and click Table to Text. From the menu, use Extensions > Text To Table Converter > Selected Table to Text.
- The text appears directly below the original table. The table itself is not changed.
1 / 3
First Name,Last Name,Department,E-Mail
Alice,Johnson,HR,alice.johnson@example.com
Bob,Smith,IT,bob.smith@example.com
Clara,Lee,FIN,clara.lee@example.com
David,Kim,MKT,david.kim@example.comSelection tips
Google Sheets™ requires you to select the specific range of cells that contains the table data you want to adjust.
Choose CSV, Markdown, or HTML
Click the ▾ arrow next to Table to Text in the sidebar to open its options. Pick a format there before you convert.
- Download as file saves the result in the chosen format through your browser.
- Copy to clipboard copies the result. If the browser blocks clipboard access, the sidebar shows the text in a box so you can copy it by hand.
- When either option is on, nothing is inserted into the document. Turn both off to insert the text below the table again.
- The Extensions menu item always uses CSV. Use the sidebar for Markdown or HTML.
Swipe sideways to see all columns
| Format | Good for | File type |
|---|---|---|
| CSV | Spreadsheets, databases, and data imports | .csv |
| Markdown | README files, GitHub, Notion, wikis, and chat tools | .md |
| HTML | Web pages, CMS editors, and email templates | .html |
Example Markdown and HTML output
The team table from above, converted to Markdown. Pipes inside a cell are escaped, and line breaks inside a cell become spaces. If some rows have fewer cells than others, empty cells are added so that no data is lost.
| First Name | Last Name | Department | E-Mail |
| --- | --- | --- | --- |
| Alice | Johnson | HR | alice.johnson@example.com |
| Bob | Smith | IT | bob.smith@example.com |HTML output
The first row becomes the table header. The HTML is written on a single line with no styling, and characters such as < and & are escaped. Line breaks inside a cell become <br>. The example below is spread over several lines to make it easier to read.
<table>
<thead>
<tr><th>First Name</th><th>Last Name</th><th>Department</th><th>E-Mail</th></tr>
</thead>
<tbody>
<tr><td>Alice</td><td>Johnson</td><td>HR</td><td>alice.johnson@example.com</td></tr>
<tr><td>Bob</td><td>Smith</td><td>IT</td><td>bob.smith@example.com</td></tr>
</tbody>
</table>Changing the delimiter
CSV output uses a comma (,) between columns by default. If you need tab-separated or semicolon-separated text instead, change the delimiter in the settings.
- Open Extensions > Text To Table Converter > Settings and expand Table To Text Options to change the delimiter.
- Use this when the converted text needs to be pasted into another application that expects a specific delimiter.
Handling commas within your data
If your original table cells contain commas, the add-on follows standard CSV conventions (RFC 4180) when converting to text. It automatically encloses the entire cell content containing commas within double quotes. This ensures the comma is not misinterpreted as a column separator when you use the text later.
- For example, one E-Mail cell might contain two addresses separated by a comma: david.kim@example.com, david.kim@sales.example.com.
- When this table is converted, that cell is enclosed in double quotes in the output text to preserve the comma correctly.
First Name,Last Name,Department,E-Mail
Alice,Johnson,HR,alice.johnson@example.com
Bob,Smith,IT,bob.smith@example.com
David,Kim,MKT,"david.kim@example.com, david.kim@sales.example.com"Converting multiple tables
You can select multiple tables simultaneously and convert them all at once using the same steps. The text from each table will be inserted sequentially below its respective original table.