CSV to Unicode Table Converter
Convert CSV data to beautifully formatted Unicode box-drawing tables. Supports auto-delimiter detection, multiple border styles, and column alignment.
About
Pasting tabular data into plain-text environments (Markdown files, terminal logs, code comments, Slack messages, emails without HTML) destroys alignment. Columns collapse. Readability drops to near zero. Manually spacing columns with whitespace breaks the moment a single cell changes width. This converter parses raw CSV input using an RFC 4180-compliant state machine and renders it as a Unicode box-drawing table with precise column-width calculation. It handles quoted fields containing embedded commas, escaped double-quotes (""), and mixed line endings. Three border sets are available: Light (U+2500 block), Heavy (U+2501 block), and Double (U+2550 block). Column alignment is auto-detected - numeric data aligns right, text aligns left - but can be overridden manually.
The delimiter is auto-detected via frequency analysis across the first 10 rows, supporting comma, semicolon, tab, and pipe characters. Note: this tool assumes well-formed CSV. Malformed input (unmatched quotes, binary data) will produce unpredictable output. For CSVs exceeding 10,000 rows, only the first 50 rows are previewed, though the full output is generated for download. Pro tip: when pasting into monospaced environments, verify your font renders all box-drawing characters at uniform width - some fonts break alignment on double-line characters.
Formulas
Column width calculation determines the visual width of each column in the output table. For each column j, the rendered width Wj is computed as:
where celli,j is the content of row i at column j, len returns the character count, and p is the horizontal padding (default 1 space per side). The max is taken across all rows i ∈ [0, n] including the header row.
Delimiter auto-detection uses frequency analysis. For each candidate delimiter d ∈ {, ; \t |}, the tool counts occurrences per line across the first 10 rows and computes the variance σ2 of those counts:
where ci is the count of delimiter d in row i, and is the mean count. The delimiter with the lowest non-zero variance and highest mean count is selected. A consistent delimiter produces zero variance across uniform rows.
Reference Data
| Character | Unicode | Name | Used In |
|---|---|---|---|
| ─ | U+2500 | Light Horizontal | Light borders |
| │ | U+2502 | Light Vertical | Light borders |
| ┌ | U+250C | Light Down and Right | Top-left corner |
| ┐ | U+2510 | Light Down and Left | Top-right corner |
| └ | U+2514 | Light Up and Right | Bottom-left corner |
| ┘ | U+2518 | Light Up and Left | Bottom-right corner |
| ├ | U+251C | Light Vertical and Right | Left T-junction |
| ┤ | U+2524 | Light Vertical and Left | Right T-junction |
| ┬ | U+252C | Light Down and Horizontal | Top T-junction |
| ┴ | U+2534 | Light Up and Horizontal | Bottom T-junction |
| ┼ | U+253C | Light Vertical and Horizontal | Cross junction |
| ━ | U+2501 | Heavy Horizontal | Heavy borders |
| ┃ | U+2503 | Heavy Vertical | Heavy borders |
| ┏ | U+250F | Heavy Down and Right | Heavy top-left |
| ┓ | U+2513 | Heavy Down and Left | Heavy top-right |
| ┗ | U+2517 | Heavy Up and Right | Heavy bottom-left |
| ┛ | U+251B | Heavy Up and Left | Heavy bottom-right |
| ╋ | U+254B | Heavy Vertical and Horizontal | Heavy cross |
| ═ | U+2550 | Double Horizontal | Double borders |
| ║ | U+2551 | Double Vertical | Double borders |
| ╔ | U+2554 | Double Down and Right | Double top-left |
| ╗ | U+2557 | Double Down and Left | Double top-right |
| ╚ | U+255A | Double Up and Right | Double bottom-left |
| ╝ | U+255D | Double Up and Left | Double bottom-right |
| ╬ | U+256C | Double Vertical and Horizontal | Double cross |
| ╠ | U+2560 | Double Vertical and Right | Double left T |
| ╣ | U+2563 | Double Vertical and Left | Double right T |
| ╦ | U+2566 | Double Down and Horizontal | Double top T |
| ╩ | U+2569 | Double Up and Horizontal | Double bottom T |