↧ Expand ↧↥ Collapse ↥
Result (updated automatically as you edit the table)

Text Tables Generator

How to use the text tables generator?

  1. Enter the data. Copy cells from a spreadsheet (Excel, Google Sheets, LibreOffice Calc) or a table on a web page, click a cell and press Ctrl+V: the table grows to fit them. Or click a cell and type: typing replaces its text, while a double click or Enter edits the text that is there (Esc or a click elsewhere ends the edit). Tab and the arrow keys move to the next cell. Add and remove rows and columns with the Row and Column menus, or by right-clicking a cell. You can also import an Excel workbook or a CSV file with File / Import CSV or Excel file.
  2. Format it. Select cells by clicking them, by dragging over them or with Shift and the arrow keys (Ctrl+click adds a cell), then merge them or align their text with the toolbar and the Cell and Column menus.
  3. Copy the table. It appears under the editor as you edit, its columns lined up: click Copy to clipboard and paste it into a text file, a code comment, an e-mail or a forum post.

What does the table look like?

The table is drawn with +, - and |, in which merged cells and cells with several lines of text are possible:

+---------------------------------------+
|                Results                |
+-------------+-------------------------+
|             |        Contestant       |
| Competition +-------+--------+--------+
|             |  John | Andrea | Robert |
+-------------+-------+--------+--------+
| Swimming    |  1:30 |   2:05 |   1:15 |
+-------------+-------+--------+--------+
| Running     | 15:30 |  14:10 |  15:45 |
+-------------+-------+--------+--------+

Use Unicode symbols for table borders draws it with box drawing characters (╔═╦═╗) instead; they line up only in a fixed-width font that has these characters (such as Consolas, Menlo or DejaVu Sans Mono), so for readers whose font you do not know, keep the ASCII lines. With Use reStructuredText syntax the header is underlined with =, which makes it a reStructuredText grid table (for Sphinx and Python documentation). The table lines up only in a monospaced font, and only as long as its lines are not wrapped, so keep wide tables out of places that wrap long lines.

For the kinds of text tables, reStructuredText tables and converting text to a table in Word, Excel and Google Sheets, see our guide Text tables: ASCII, Unicode and reStructuredText.

Convert text to a table

Select File / Paste table data, paste the text and click Load. These kinds of text become a table:

  • columns separated by tabs, which is what you copy from a spreadsheet;
  • columns separated by commas or semicolons (CSV);
  • an ASCII table drawn with +, - and |, with its merged cells;
  • a Markdown or MediaWiki table, or HTML code of a table.

Columns separated by spaces are not split: replace the spaces between the columns with tabs first. Then copy the cells to Excel (click a cell, press Ctrl+A and Ctrl+C, and paste them in the spreadsheet), or open the HTML, Markdown or LaTeX tables generator in the same browser tab to get the table in that format.

Where to paste the table

  • A code comment: paste the table, select its lines and comment them out, for example with Ctrl+/ in VS Code and most other code editors. The comment signs move each line by the same number of characters, so the columns stay in line.
  • Discord, Slack, Telegram or WhatsApp: put ``` on the line before the table and on the line after it. The chat then shows it in a fixed-width font. Keep it narrow, about 40 characters, for phones.
  • A README file: in a README.md, put the table in a code block (```), or make a real table with our Markdown Tables Generator.
  • An e-mail: many e-mail programs show text in a proportional font, where the columns do not line up. Send an HTML table instead.

Why do the columns not line up?

The font is not fixed-width
In a proportional font, an i is narrower than a W. Show the table in a code block, a <pre> element, or a font such as Consolas or Courier New.
The lines are wrapped
A line longer than the window breaks, and its end moves to the next line. Make the window wider, turn off word wrap, or make the table narrower: drag the right edge of a column's header to the left, and the text of its cells breaks into lines.
Only the box-drawing lines are out of line
The font has no box-drawing characters and takes them from another font. Use a font that has them, or uncheck Use Unicode symbols for table borders.
Rows with emoji or Chinese characters stick out
These take the width of two letters, and the generator counts them so. Some fonts draw emoji a little wider or narrower: leave them out of the table when you can.