ConvertCSV

Browser-based CSV converter

CSV to ASCII Table Converter

Turn CSV rows into a padded plain-text table for terminals, emails, and READMEs. Paste CSV, upload a file, preview the output, then copy or download the converted result.

Input

Paste CSV or upload a CSV file

Output Preview

ASCII table

Convert your input to preview the output here.

CSV to ASCII Table Converter

Sometimes the right place for a table is a terminal, a commit message, a support ticket, or a plain-text email where no spreadsheet will open. This CSV to ASCII table converter takes your rows and draws a fixed-width table with borders and padded columns, so the columns still line up when the text is pasted into a monospaced context.

Choose the border style that matches where the text will go: ASCII for email and chat, Unicode box lines for a modern terminal. Then copy the result.

A typical destination is a short table in a GitHub comment, where the borders survive only inside a code fence. The notes below cover how the widths are chosen and where wide characters push a row out of line.

Key features

  • Pads every column to the width of its longest value, including the header, so the borders close evenly.
  • Offers an ASCII style built from plus, hyphen, and pipe characters, which is the default.
  • Offers a Unicode style with box-drawing corners and intersections.
  • Collapses line breaks inside cells so each record stays on one table row.
  • Keeps the header separated from the body by its own rule line.
  • Leaves the header rule and the closing rule in place even when the table has no body rows.

About the CSV to ASCII or Unicode text table format

Each column is as wide as its longest value, header included, plus one space of padding on each side. Cells are left-aligned, and shorter values are padded with spaces on the right. The table starts with a rule line, then the header, a rule line that separates the header from the body, the data rows, and a closing rule.

The default ASCII style uses plus signs for corners and intersections, hyphens for horizontal rules, and pipes for vertical rules. It contains only characters that every terminal and every mail client can display. The Unicode style uses box-drawing characters such as ┌, ─, and │, which look tidier in a terminal with a font that supports them.

Line breaks inside a quoted CSV cell are collapsed into a single space, so a multi-line note still fits on one row of the table. Widths are measured in characters, not in screen columns, which matters for some scripts discussed in the pitfalls below.

How it works

The converter parses the CSV with quoted-field support, normalises the headers, and builds a matrix that includes the header row as its first line.

It measures the longest value in each column and sets that as the column width. Each cell is then padded to that width and wrapped in one space on each side.

The border characters are chosen from the selected style. The top rule, header, separator rule, body rows, and bottom rule are joined with line breaks to produce the final text.

Common use cases

  • Pasting a small inventory summary into a commit message or pull request description.
  • Sharing a query result with a colleague in an email that will be read in a plain-text client.
  • Documenting a list of supported platforms or versions in a README that uses a code block.
  • Putting a status report of server checks into an incident ticket without attaching a file.
  • Printing a quick reference table in a terminal session or a log message during a script run.

How to use this tool

  1. Paste the rows into the text box with the column titles on the first line, or select a file with Click to upload.
  2. Choose the border style: ASCII for maximum compatibility, or Unicode for terminals that display box-drawing characters.
  3. Click Convert and check the preview. Confirm that each row has the same number of cells as the header.
  4. Copy the table. In Markdown, paste it inside a triple-backtick block so it renders as preformatted text.
  5. If the table is too wide, shorten the longest cells in your spreadsheet and convert again.

Example

Input CSV

city,population,country
London,8982000,UK
Tokyo,13960000,Japan

Output (ASCII style)

+--------+------------+---------+
| city   | population | country |
+--------+------------+---------+
| London | 8982000    | UK      |
| Tokyo  | 13960000   | Japan   |
+--------+------------+---------+

Tips for best results

  • Shorten long text columns in the sheet first. A single 120-character cell widens its entire column and can push the table past 80 columns.
  • Use the ASCII style for anything that will be pasted into email, chat, or a file that might be read on an old system.
  • Use the Unicode style for terminal output on a modern system, where the box lines are easier to scan.
  • Format numbers the way you want them printed before converting, since 1,200 and 1200 in the CSV are shown exactly as written and widen the column differently.

Common errors and how to fix them

The table looks shifted to the right in one row.
That row has a cell containing a wide character, such as a CJK character or an emoji, which the converter counts as one character but the terminal draws as two. Replace the wide character with ASCII text, or accept the shift and edit that line by hand.
The table renders as plain text with the pipes and plus signs stacked up in Markdown.
Markdown reflows unfenced text, so runs of spaces collapse and pipes can be read as table syntax. Check that the preformatted block is intact in the destination's preview before posting.
The converter says no rows were found.
The input was blank or contained only empty lines. Paste the CSV with its header row, or check that the upload is a text CSV rather than an empty export.
Some header names look different from the spreadsheet.
Headers are rewritten before the table is drawn: spaces become underscores, a leading digit gets column_ in front, and characters outside ASCII letters, digits, underscore and hyphen are dropped, so an accented letter disappears. Rename the headers in the sheet to the form you want printed.

Best practices

  • Keep column values short in anything meant for a fixed-width display, and move long descriptions to a separate paragraph.
  • Use the ASCII style by default and switch to Unicode only when you know the destination renders it.
  • After a cell changes length, re-convert rather than adjusting spaces, because one longer value widens every row in its column at once.

How column widths are calculated

The width of each column is the length of its longest value, measured across the header and every data row. The header is included on purpose, because a long column title that is wider than all the values would otherwise be cut off visually.

A column of one-digit values under a header called rank is therefore four characters wide plus the two padding spaces. The border line above it is always exactly the same width as the cells beneath it.

ASCII style versus Unicode box lines

ASCII uses +, -, and | and works in every text context, including email clients, logs, and old terminals. It is the safe default when you do not know where the text will end up.

Unicode uses light box-drawing characters for corners, joins, and rules. It is easier to scan in a modern terminal, but it can break in a plain-text email or a system that expects ASCII only.

When to use a table instead of a file

A plain-text table is a good way to show a small, stable set of rows, such as twelve servers or five plan tiers. Once the table grows beyond a screen, a CSV attachment or a spreadsheet link serves readers better.

Tables are read more slowly than sentences, so pair a short summary line with the table when the table is part of a message or document.

Frequently asked questions

Does the converter add a header rule between the title and the rows?

Yes. The output has a rule line above the header, one below the header, and one at the bottom, so the header is visually separated from the data.

Will the output work in a GitHub issue or pull request?

It works when wrapped in a fenced code block. Without the fence, Markdown may reflow the text, so always paste the output between triple backticks.

Can I make the columns narrower?

The converter does not truncate values. Shorten the longest cells in your spreadsheet, and the column widths will shrink on the next conversion.

For more background on data formats and conversion workflows, read our format guides.