csv-to-text-columns
Converting CSV to text columns produces a fixed-width, monospace-aligned output where each column has the same width regardless of value length. Useful for sending readable data over email, posting in chat, or putting into a markdown code block. Unlike a Markdown table (which renders only after rendering), text columns are readable as-is. The ZTools CSV to Text Columns tool computes per-column max width, pads each cell, supports left/right/centre alignment, and offers separator styles (spaces only, pipe + spaces, or full ASCII box).
Use casesβ
Share data over email or chatβ
A CSV is hard to read inline. Text columns turn 5 rows of 4 columns into a clean aligned block any client renders correctly.
Embed in Slack / Discordβ
Markdown tables render in some places, not others. Triple-backtick monospace with text columns renders everywhere.
Generate a quick console-style reportβ
CLI tools output aligned text. Reproduce that look from a CSV without writing format code.
Print-friendly outputβ
Tables in HTML print weirdly. Plain monospace text always prints predictably.
How it worksβ
- Paste CSV β Tool parses (RFC 4180). First row optionally treated as header.
- Compute widths β For each column, max(value length across all rows). Header included if present.
- Pick alignment + style β Left, right, or centre per column. Separator: spaces, pipe (
|), or ASCII box (+--+). - Render and copy β Output is a monospace block. Copy and paste anywhere monospace renders.
Examplesβ
Input: name,age\nAlice,30\nBob,5
Output: Spaces:\nname age\nAlice 30\nBob 5\n\nWith pipes:\n| name | age |\n| Alice | 30 |\n| Bob | 5 |
Input: Right-align numbers
Output: Numeric columns right-align so digits line up β easier to scan.
Input: ASCII box
Output: +-------+-----+\n| name | age |\n+-------+-----+\n| Alice | 30 |\n| Bob | 5 |\n+-------+-----+
Frequently asked questionsβ
Why not just use Markdown tables?
Markdown renders only in Markdown-aware contexts. Text columns render in any monospace block β email, chat, terminal, log files.
Does it handle multi-line cell values?
Limited β cells with newlines wrap awkwardly. Strip newlines from the source CSV first for cleanest output.
How does it handle Unicode width?
Wide-width characters (CJK, emoji) take 2 monospace cells. Toggle "wide-char aware width" to align them properly; otherwise the right edge looks ragged.
Max columns / rows?
No hard limit. Browser memory is the ceiling β 10,000 rows Γ 50 columns renders comfortably.
Can I export to PDF?
Copy the result, paste into any text or PDF tool. The monospace alignment survives as long as the destination uses a monospace font.
Tipsβ
- Right-align numeric columns β digits line up at the units, much easier to read.
- For Slack / Discord, wrap output in triple backticks (```) β forces monospace rendering.
- When emailing the output, send as plain text β HTML email clients sometimes change the font and break alignment.
- For very wide columns, truncate values first; otherwise the table wraps and loses alignment.
Try it nowβ
The full csv-to-text-columns runs in your browser at https://ztools.zaions.com/csv-to-text-columns β no signup, no upload, no data leaves your device.
Last updated: 2026-05-06 Β· Author: Ahsan Mahmood Β· Edit this page on GitHub