Text to ASCII Table Generator

Paste your comma-separated rows below to build an ASCII table.

How it is calculated

The input is split into lines and every non-empty line becomes a row; blank lines are skipped. Each row is split at every comma and each cell is trimmed of surrounding spaces. The number of columns is the largest cell count found in any row, and shorter rows are padded with empty cells. The width of a column is the length, counted in characters, of its longest cell.

Each cell is then written as | text + padding | with one space on both sides, and a border line of + and - (column width plus 2 dashes per column) is drawn above the table and after every row. There is no special header row, so the first line is formatted like all the others. The tool also reports the row count and the column count. Empty input gives no result.

Worked example

The input has four non-empty lines: Name,Qty,Price, Apple,3,1.20, Banana,12 (one cell short) and Cherry,100,0.5, with one blank line between them that is ignored. The widest rows have 3 cells, so there are 3 columns. Longest cells: Banana and Cherry (6), Qty and 100 (3), Price (5). Each border segment is the width plus 2, giving +--------+-----+-------+. Result: 4 rows, 3 columns, with Banana's missing price left blank.

Try this example →

Common mistakes

  • Putting a comma inside a value, such as Smith, John or 1,200. Quotes are not understood: every comma starts a new cell, so the row gets an extra column and the other rows are padded.
  • Using tabs or semicolons as separators. Only the comma splits cells, so a line like a;b followed by a tab and c stays in a single column.
  • Expecting a divider under the header. All rows are drawn the same way, with a border after each one, so the header is not marked specially.
  • Pasting wide characters such as emoji or CJK text and expecting perfect alignment. Width is counted per character, but those characters can take two columns in a monospaced font, so the right edge may look ragged.
  • Relying on leading or trailing spaces inside a cell. They are removed on purpose, so indentation within a cell is lost.

About this calculator

An ASCII table renders tabular data as plain monospaced text, using characters like +, -, and | to draw the grid lines and box corners instead of relying on HTML markup or spreadsheet formatting. Because it's just plain text, it displays correctly anywhere a fixed-width font is used — terminals, code comments, plain-text emails, README files, and chat messages — with no rendering engine required.

This tool converts comma-separated rows into a clean, auto-aligned ASCII table, padding each column to the width of its longest value. It's a practical utility for developers documenting CLI output or config examples, technical writers formatting data for Markdown code blocks, and anyone who needs to paste a readable data table into a plain-text context where real tables aren't supported.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    Pasting the result into a README or a forum post is where tables usually break: Markdown and many editors collapse runs of spaces unless the text sits inside a fenced code block, so wrap the output in one. Because every row gets its own border line, the output also looks different from a Markdown pipe table. Which place do you paste your tables into most, a terminal, documentation or an email?

Popular calculators

All Calculators