How to use the ascii box table formatter
- Paste your rows into the first box. Cells may be separated by commas, tabs, semicolons or pipes; the page detects the separator unless you choose one.
- Choose the style: ASCII lines, single or double Unicode box lines, or plain with no box.
- Choose the alignment, the widest a column may be before its text wraps (0 for no limit), and whether the first row is a header.
- Copy the table or download it as a text file, and paste it into a monospace font such as a code block.
How the columns are sized
Each column is as wide as its widest cell, measured in display columns, not characters. Wide East Asian characters and most emoji take two columns, accent marks added to letters take none, and everything else takes one. This is what keeps the lines of a table straight in a terminal, a code block or a plain text email. With the first style on, the table is drawn with plus signs, hyphens and vertical bars, which survive being copied almost anywhere.
In the automatic alignment, a column whose body cells all look like numbers (with signs, commas, a dollar, euro or pound sign, a percent sign or brackets) is right aligned, and the other columns are left aligned. Choose a fixed alignment to override that for every column.
Quoted cells and long cells
A cell in double quotes may contain the separator, quotes written twice, and even line breaks, which become extra lines inside the row. A column limit wraps long text at spaces, and cuts a word only when the word is longer than the limit.
For a table that will be rendered on a web page, use the Markdown Table Generator or the HTML Table Generator. To convert the same rows to JSON, see the CSV to JSON Converter, and the Text Line Tools can sort or clean the lines first.
Privacy and limits
Everything happens in your browser and nothing is uploaded. Up to 20,000 cells are accepted at a time. Some fonts draw box characters or emoji at a different width, so a table can look slightly off in those places even when the text itself is right.
Assumptions and limits
- Rows with fewer cells than the widest row are filled out with empty cells.
- Blank lines are ignored, and tabs inside quoted cells are kept as single characters.
- Width follows the Unicode East Asian Width classes for wide characters and treats marks and invisible joiners as zero width.
- The single and double line styles use box drawing characters, which need a font that has them.
- The tests draw sixty tables and compare every line with a separate layout written with Python's unicodedata module.
Frequently asked questions
Why do my columns not line up when I paste the table?
The table only lines up in a font where all characters are the same width, such as a code block or a terminal. In a proportional font it will look ragged.
How do I put a comma inside a cell?
Put the cell in double quotes, as in "Cups, paper". A quote inside it is written twice.
What does the header setting do?
It draws a line under the first row. It also stops the first row from deciding whether a column is numbers.
Why is a column right aligned when I did not ask for it?
In the automatic alignment, a column whose cells all look like numbers is right aligned so that digits line up. Choose All left to change that.