ASCII Table Generator
ASCII Table Generator splits non-empty input lines at every comma, trims cells, finds maximum JavaScript string lengths by column, and pads an ASCII border table. The first row receives a separator underneath. Quoted CSV, embedded commas, wide Unicode characters, tabs, ANSI color codes, and multiline cells are not measured or parsed correctly.
Runs locally — files stay on your deviceWhy can a Unicode ASCII table look misaligned?
JavaScript string length does not equal terminal display width for emoji, combining characters, or East Asian wide glyphs.
Text alignment depends on display columns, not only character count
Monospace tables require measuring terminal cell width. Some Unicode code points occupy zero, one, or two display columns, while this implementation uses string length.
How it works
Rows are comma-split, maximum cell lengths determine each column width, padEnd adds spaces, and +, -, and | form borders.
Key concepts
The first row is visually separated
It is treated like a header even if the data has none.
ASCII output assumes monospaced display
Proportional fonts will not align columns.
When to use it
- Format a small ASCII-only comma grid.
- Create a quick monospaced table.
- Preview column widths for simple labels.
When not to use it
- Do not use quoted CSV with commas.
- Do not expect correct emoji or wide-character alignment.
- Do not use tabs, line breaks, or terminal escape sequences inside cells.
Worked examples
Basic rows
- Input
Name,Age\nAna,30- Expected output
A bordered two-column table
Widths follow the longest cell in each column.
Quoted comma
- Input
"Smith, Ana",30- Expected output
Three parsed cells
Quotes have no CSV meaning here.
Emoji
- Input
Icon,Name\n🙂,Smile- Expected output
May appear misaligned
Display width is not calculated.
Common mistakes
Using a proportional font
Spaces have different visual widths. Correction: Render in a monospace font.
Supplying real CSV
Quoted delimiters are split. Correction: Pre-parse CSV with an RFC-aware library.
Expecting Unicode width handling
Code-unit length is used. Correction: Use a terminal-width-aware formatter.
Best practices
- Use ASCII content and a monospace display.
- Keep rows short.
- Review output in its target terminal or document.
Related operations and differences
CSV to Markdown Table
Choose CSV to Markdown Table when you need to turn comma-separated rows into a Markdown table.; use ASCII Table Generator specifically for ascii table.
Markdown Table to CSV
Choose Markdown Table to CSV when you need to convert a Markdown table into CSV rows.; use ASCII Table Generator specifically for ascii table.
Markdown Table Generator
Choose Markdown Table Generator when you need to generate an empty Markdown table with custom columns.; use ASCII Table Generator specifically for ascii table.
Document Link Extractor
Choose Document Link Extractor when you need to extract labeled links from Markdown or HTML.; use ASCII Table Generator specifically for ascii table.
Document Word Statistics
Choose Document Word Statistics when you need to measure words, characters, lines and reading time.; use ASCII Table Generator specifically for ascii table.
HTML to Markdown Converter
Choose HTML to Markdown Converter when you need to convert common HTML elements into clean Markdown.; use ASCII Table Generator specifically for ascii table.
Limitations and privacy
- Simple comma splitting.
- No quote, multiline, terminal-width, tab, ANSI, or wrapping support.
- First row is always separated as a header.
Document text is transformed locally in this browser.
Frequently asked questions
Does it parse quoted CSV?
No.
Is a monospace font required?
For alignment, yes.
Are emoji widths handled?
No.
Is the first row treated as a header?
Visually, yes.